Accord.Tests.Statistics.BhapkarTestTest.BhapkarTestConstructorTest C# (CSharp) 메소드

BhapkarTestConstructorTest() 개인적인 메소드

private BhapkarTestConstructorTest ( ) : void
리턴 void
        public void BhapkarTestConstructorTest()
        {
            // Bhapkar, V.P. (1966). A note on the equivalence of two test criteria
            // for hypotheses in categorical data. Journal of the American Statistical
            // Association, 61, 228-235.

            int[,] vision =
            {
                { 1520,  266,  124,  66 },
                {  234, 1512,  432,  78 },
                {  117,  362, 1772, 205 },
                {   36,   82,  179, 492 },
            };

            GeneralConfusionMatrix a = new GeneralConfusionMatrix(vision);

            BhapkarTest target = new BhapkarTest(a);

            Assert.AreEqual(11.97572, target.Statistic, 1e-5);
            Assert.AreEqual(0.00746679746972, target.PValue, 1e-6);
            Assert.AreEqual(3, target.DegreesOfFreedom);

            Assert.IsFalse(double.IsNaN(target.Statistic));
            Assert.IsFalse(double.IsNaN(target.PValue));
        }