Package aima.core.learning.inductive

Examples of aima.core.learning.inductive.DLTestFactory


      System.out
          .println("DecisionList Demo - Inducing a DecisionList from the Restaurant DataSet\n ");
      System.out.println(Util.ntimes("*", 100));
      DataSet ds = DataSetFactory.getRestaurantDataSet();
      DecisionListLearner learner = new DecisionListLearner("Yes", "No",
          new DLTestFactory());
      learner.train(ds);
      System.out.println("The Induced DecisionList is");
      System.out.println(learner.getDecisionList());
      int[] result = learner.test(ds);

View Full Code Here


public class DLTestTest {

  @Test
  public void testDecisionList() throws Exception {
    DataSet ds = DataSetFactory.getRestaurantDataSet();
    List<DLTest> dlTests = new DLTestFactory()
        .createDLTestsWithAttributeCount(ds, 1);
    Assert.assertEquals(26, dlTests.size());
  }
View Full Code Here

  @Test
  public void testDecisionListTestRunOnRestaurantDataSet() throws Exception {
    DataSet ds = DataSetFactory.getRestaurantDataSet();
    DecisionListLearner learner = new DecisionListLearner("Yes", "No",
        new DLTestFactory());
    learner.train(ds);

    int[] result = learner.test(ds);
    Assert.assertEquals(12, result[0]);
    Assert.assertEquals(0, result[1]);
View Full Code Here

TOP

Related Classes of aima.core.learning.inductive.DLTestFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.