Package aima.core.learning.inductive

Examples of aima.core.learning.inductive.DLTest.matchedExamples()


    if (test == null) {
      return new DecisionList(null, FAILURE);
    }
    // at this point there is a test that classifies some subset of examples
    // with the same target value
    DataSet matched = test.matchedExamples(ds);
    DecisionList list = new DecisionList(positive, negative);
    list.add(test, matched.getExample(0).targetValue());
    return list.mergeWith(decisionListLearning(test.unmatchedExamples(ds)));
  }
View Full Code Here


    if (test == null) {
      return new DecisionList(null, FAILURE);
    }
    // at this point there is a test that classifies some subset of examples
    // with the same target value
    DataSet matched = test.matchedExamples(ds);
    DecisionList list = new DecisionList(positive, negative);
    list.add(test, matched.getExample(0).targetValue());
    return list.mergeWith(decisionListLearning(test.unmatchedExamples(ds)));
  }
View Full Code Here

      throws Exception {
    DataSet ds = DataSetFactory.getRestaurantDataSet();
    DLTest test = new DLTest();
    test.add("type", "Burger");

    DataSet matched = test.matchedExamples(ds);
    Assert.assertEquals(4, matched.size());

    DataSet unmatched = test.unmatchedExamples(ds);
    Assert.assertEquals(8, unmatched.size());
  }
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.