Package aima.core.learning.learners

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


    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

Related Classes of aima.core.learning.learners.StumpLearner

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.