Accord.Tests.Statistics.GeneralConfusionMatrixTest.TotalTest C# (CSharp) Method

TotalTest() private method

private TotalTest ( ) : void
return void
        public void TotalTest()
        {
            int[,] matrix = 
            {
                { 1, 2, 3 },
                { 4, 5, 6 },
                { 7, 8, 9 },
            };

            GeneralConfusionMatrix target = new GeneralConfusionMatrix(matrix);

            int[] colTotals = target.ColumnTotals;
            int[] rowTotals = target.RowTotals;

            Assert.AreEqual(1 + 2 + 3, rowTotals[0]);
            Assert.AreEqual(4 + 5 + 6, rowTotals[1]);
            Assert.AreEqual(7 + 8 + 9, rowTotals[2]);

            Assert.AreEqual(1 + 4 + 7, colTotals[0]);
            Assert.AreEqual(2 + 5 + 8, colTotals[1]);
            Assert.AreEqual(3 + 6 + 9, colTotals[2]);
        }