Package edu.uci.jforestsx.learning.trees

Examples of edu.uci.jforestsx.learning.trees.Tree


      Sample subLearnerOutOfTrainSet = trainSet.getOutOfSample(subLearnerTrainSet);
      Sample subLearnerValidSet = (validSet == null || validSet.isEmpty() ? subLearnerOutOfTrainSet : validSet);
      Ensemble subEnsemble = subLearner.learn(subLearnerTrainSet, subLearnerValidSet);

      for (int t = 0; t < subEnsemble.getNumTrees(); t++) {
        Tree tree = subEnsemble.getTreeAt(t);
        double curTreeWeight = subEnsemble.getWeightAt(t);
        if (backfit) {
          tree.backfit(subLearnerOutOfTrainSet);
        }
        ensemble.addTree(tree, curTreeWeight);
        System.out.println(tree.numLeaves);
      }
View Full Code Here


      Ensemble subEnsemble = subLearner.learn(subLeanerSample, validSet);
      if (subEnsemble == null) {
        break;
      }
      for (int t = 0; t < subEnsemble.getNumTrees(); t++) {
        Tree tree = subEnsemble.getTreeAt(t);
        ensemble.addTree(tree, subEnsemble.getWeightAt(t));
        if (validSet != null) {
          LearningUtils.updateScores(validSet, validPredictions, ((RegressionTree) tree), 1.0);
        }
      }
View Full Code Here

TOP

Related Classes of edu.uci.jforestsx.learning.trees.Tree

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.