示例#1
0
 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);
 }
示例#2
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);
        }