예제 #1
0
        public static void TestCalculateCriterionEntropy()
        {
            var    decisionTree = new DecisionTree();
            double actualResult = decisionTree.CalculateEntropy(table, "Play Tennis", "Outlook", "Sunny");

            Assert.AreEqual(0.97, actualResult, 0.001);
        }
예제 #2
0
        public static void TestCalculateEntropy()
        {
            var    decisionTree = new DecisionTree();
            double actualResult = decisionTree.CalculateEntropy(table, "Play Tennis");

            Assert.AreEqual(0.94, actualResult, 0.001);
        }