Inheritance: Accord.Statistics.Testing.ChiSquareTest
        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));
        }
 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);
 }