Examples of DLTest


Examples of aima.core.learning.inductive.DLTest

  public void testDecisionListMerge() throws Exception {
    DecisionList dlist1 = new DecisionList("Yes", "No");
    DecisionList dlist2 = new DecisionList("Yes", "No");
    DataSet ds = DataSetFactory.getRestaurantDataSet();

    DLTest test1 = new DLTest();
    test1.add("type", "Thai"); // doesn't match first example
    dlist1.add(test1, "test1success");

    DLTest test2 = new DLTest();
    test2.add("type", "French");
    dlist2.add(test2, "test2success");// matches first example

    DecisionList dlist3 = dlist1.mergeWith(dlist2);
    Assert.assertEquals("test2success", dlist3.predict(ds.getExample(0)));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.