Examples of RegressionTree


Examples of edu.uci.jforestsx.learning.trees.regression.RegressionTree

    updateScores(sampleSet, scores, ensemble, null);
  }
 
  public static void updateScores(Sample sampleSet, double[] scores, Ensemble ensemble, LearningProgressListener progressListener) {
    for (int t = 0; t < ensemble.getNumTrees(); t++) {
      RegressionTree tree = (RegressionTree) ensemble.getTreeAt(t);
      double treeWeight = ensemble.getWeightAt(t);
      //System.out.println("Using tree " + t + " with weight: " + treeWeight); // SISTA
      for (int i = 0; i < sampleSet.size; i++) {
        //System.out.println("Classifying datum #" + i + " with index " + sampleSet.indicesInDataset[i]); // SISTA
        scores[i] += treeWeight * tree.getOutput(sampleSet.dataset, sampleSet.indicesInDataset[i]);
      }
      if (progressListener != null) {
        progressListener.onScoreEval();
      }
    }
View Full Code Here

Examples of edu.uci.jforestsx.learning.trees.regression.RegressionTree

   * @return
   */
  public static double computeScore(Ensemble ensemble, Feature[] features) {
    double score = 0.0;
    for (int t = 0; t < ensemble.getNumTrees(); t++) {
      RegressionTree tree = (RegressionTree) ensemble.getTreeAt(t);
      double treeWeight = ensemble.getWeightAt(t);
      score += treeWeight * tree.getOutput(features);
    }
    return score;
  }
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.