상속: Accord.Statistics.Testing.ChiSquareTest
예제 #1
0
        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);
        }
 private void buildModel()
 {
     if(mctable==null)getMatrix();
     cofM = new ConfusionMatrix(mctable);
     gcofM1 = new GeneralConfusionMatrix(g1table);
     gcofM2 = new GeneralConfusionMatrix(g2table);
     gcofM3 = new GeneralConfusionMatrix(g3table);
     mct = new McNemarTest(cofM);
     akt = new TwoMatrixKappaTest(gcofM1, gcofM2);
     bkt = new BowkerTest(gcofM3);
     bht = new BhapkarTest(gcofM3);
 }