Examples of StumpLearner


Examples of aima.core.learning.learners.StumpLearner

      System.out
          .println("\nStump Learners vote to decide in this algorithm");
      for (Object stump : stumps) {
        DecisionTree sl = (DecisionTree) stump;
        StumpLearner stumpLearner = new StumpLearner(sl, "No");
        learners.add(stumpLearner);
      }
      AdaBoostLearner learner = new AdaBoostLearner(learners, ds);
      learner.train(ds);
      int[] result = learner.test(ds);
View Full Code Here

Examples of aima.core.learning.learners.StumpLearner

    DataSet ds = DataSetFactory.getRestaurantDataSet();
    List<DecisionTree> stumps = DecisionTree.getStumpsFor(ds, YES, "No");
    List<Learner> learners = new ArrayList<Learner>();
    for (Object stump : stumps) {
      DecisionTree sl = (DecisionTree) stump;
      StumpLearner stumpLearner = new StumpLearner(sl, "No");
      learners.add(stumpLearner);
    }
    AdaBoostLearner learner = new AdaBoostLearner(learners, ds);
    learner.train(ds);
    int[] result = learner.test(ds);
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.