public void KappaTest2()
{
int[,] matrix =
{
{ 24, 14 },
{ 8, 24 },
};
GeneralConfusionMatrix target = new GeneralConfusionMatrix(matrix);
Assert.AreEqual(2, target.Classes);
Assert.AreEqual(70, target.Samples);
double[,] p =
{
{ 0.343, 0.200 },
{ 0.114, 0.343 }
};
Assert.IsTrue(p.IsEqual(target.ProportionMatrix, 1e-3));
Assert.AreEqual(0.6857143, target.OverallAgreement, 1e-5);
Assert.AreEqual(0.4963265, target.ChanceAgreement, 1e-5);
Assert.AreEqual(0.376013, target.Kappa, 1e-5);
Assert.AreEqual(0.1087717, target.StandardError, 1e-5);
Assert.AreEqual(24, target.GeometricAgreement, 1e-5);
}