test() публичный Метод

public test ( DataSet ds ) : int[]
ds AIMA.Core.Learning.Framework.DataSet
Результат int[]
Пример #1
0
 public void testInducedDecisionTreeClassifiesRestaurantDataSetCorrectly()
 {
     DecisionTreeLearner learner = new DecisionTreeLearner(
             createInducedRestaurantDecisionTree(), "Unable to clasify");
     int[] results = learner.test(DataSetFactory.getRestaurantDataSet());
     Assert.AreEqual(12, results[0]);
     Assert.AreEqual(0, results[1]);
 }
Пример #2
0
        public void testStumpPredictionForDataSet()
        {
            DataSet ds = DataSetFactory.getRestaurantDataSet();

            List<String> unmatchedValues = new List<String>();
            unmatchedValues.Add(NO);
            DecisionTree tree = DecisionTree.getStumpFor(ds, "hungry", YES, YES,
                    unmatchedValues, "Unable to Classify");
            DecisionTreeLearner learner = new DecisionTreeLearner(tree,
                    "Unable to Classify");
            int[] result = learner.test(ds);
            Assert.AreEqual(5, result[0]);
            Assert.AreEqual(7, result[1]);
        }
Пример #3
0
 public void testInducedTreeClassifiesDataSetCorrectly()
 {
     DataSet ds = DataSetFactory.getRestaurantDataSet();
     DecisionTreeLearner learner = new DecisionTreeLearner();
     learner.train(ds);
     int[] result = learner.test(ds);
     Assert.AreEqual(12, result[0]);
     Assert.AreEqual(0, result[1]);
 }