Accord.Tests.Statistics.McNemarTestTest.McNemarTestConstructorTest C# (CSharp) Method

McNemarTestConstructorTest() private method

private McNemarTestConstructorTest ( ) : void
return void
        public void McNemarTestConstructorTest()
        {
            int[,] matrix = 
            {
                { 101, 121 },
                {  59,  33 },
            };

            ConfusionMatrix a = new ConfusionMatrix(matrix);

            McNemarTest target = new McNemarTest(a, true);

            Assert.AreEqual(21.0125, target.Statistic);
            Assert.AreEqual(1, target.DegreesOfFreedom);

            McNemarTest target2 = new McNemarTest(a, false);

            Assert.AreEqual(21.355555, target2.Statistic, 1e-5);
            Assert.AreEqual(1, target2.DegreesOfFreedom);
        }