Наследование: Accord.Statistics.Testing.ChiSquareTest
Пример #1
0
        public void BowkerTestConstructorTest()
        {
            // Example from Bortz, Lienert and Klaus. Boehnke Verteilungsfreie Methoden in Der Biostatistik, pg 166
            // http://books.google.com.br/books?id=chxDIA-x3WIC&printsec=frontcover&source=gbs_atb#v=onepage&q&f=false

            int[,] matrix =
            {
                { 14,  7,  9 },
                {  5, 26, 19 },
                {  1,  7, 12 },
            };

            GeneralConfusionMatrix a = new GeneralConfusionMatrix(matrix);
            
            BowkerTest target = new BowkerTest(a);

            Assert.AreEqual(12.27, target.Statistic, 1e-2);
            Assert.IsFalse(Double.IsNaN(target.Statistic));
            Assert.AreEqual(3, target.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);
 }