public void testDLTestMatchFailsOnMismatchedExample() { DataSet ds = DataSetFactory.getRestaurantDataSet(); Example e = ds.getExample(0); aima.net.learning.inductive.DecisionListTest test = new aima.net.learning.inductive.DecisionListTest(); test.add("type", "Thai"); Assert.IsFalse(test.matches(e)); }
public void testDLTestMatchSucceedsWithMatchedExample() { DataSet ds = DataSetFactory.getRestaurantDataSet(); Example e = ds.getExample(0); aima.net.learning.inductive.DecisionListTest test = new aima.net.learning.inductive.DecisionListTest(); test.add("type", "French"); Assert.IsTrue(test.matches(e)); }
public void testDLTestMatchesEvenOnMismatchedTargetAttributeValue() { DataSet ds = DataSetFactory.getRestaurantDataSet(); Example e = ds.getExample(0); aima.net.learning.inductive.DecisionListTest test = new aima.net.learning.inductive.DecisionListTest(); test.add("type", "French"); Assert.IsTrue(test.matches(e)); }