예제 #1
0
        public void testDLTestMatchFailsOnMismatchedExample()
        {
            DataSet ds = DataSetFactory.getRestaurantDataSet();
            Example e  = ds.getExample(0);

            tvn.cosine.ai.learning.inductive.DecisionListTest test = new tvn.cosine.ai.learning.inductive.DecisionListTest();
            test.add("type", "Thai");
            Assert.IsFalse(test.matches(e));
        }
예제 #2
0
        public void testDLTestMatchSucceedsWithMatchedExample()
        {
            DataSet ds = DataSetFactory.getRestaurantDataSet();
            Example e  = ds.getExample(0);

            tvn.cosine.ai.learning.inductive.DecisionListTest test = new tvn.cosine.ai.learning.inductive.DecisionListTest();
            test.add("type", "French");
            Assert.IsTrue(test.matches(e));
        }