Accord.Tests.Statistics.WeightedConfusionMatrixTest.WeightedConfusionMatrixConstructorTest2 C# (CSharp) Method

WeightedConfusionMatrixConstructorTest2() private method

private WeightedConfusionMatrixConstructorTest2 ( ) : void
return void
        public void WeightedConfusionMatrixConstructorTest2()
        {
            double[,] matrix =
            {
                { 0.53, 0.05, 0.02 },
                { 0.11, 0.14, 0.05 },
                { 0.01, 0.06, 0.03 },
            };

            double[,] weights =
            {
                { 1.00, 0.50, 0.44 },
                { 0.90, 1.00, 0.56 },
                { 0.75, 0.66, 1.00 },
            };

            WeightedConfusionMatrix target = new WeightedConfusionMatrix(matrix, 
                weights, samples: 200);


            Assert.AreEqual(0.4453478, target.WeightedKappa, 1e-5);
            Assert.AreEqual(0.005535633, target.WeightedVariance, 1e-5);
        }
    }