public class TreeEnsembleModel
extends Object
implements scala.Serializable
| Constructor and Description |
|---|
TreeEnsembleModel(scala.Enumeration.Value algo,
DecisionTreeModel[] trees,
double[] treeWeights,
scala.Enumeration.Value combiningStrategy) |
| Modifier and Type | Method and Description |
|---|---|
int |
numTrees()
Get number of trees in forest.
|
JavaRDD<Double> |
predict(JavaRDD<Vector> features)
Java-friendly version of
predict(org.apache.spark.mllib.linalg.Vector). |
RDD<Object> |
predict(RDD<Vector> features)
Predict values for the given data set.
|
double |
predict(Vector features)
Predict values for a single data point using the model trained.
|
String |
toDebugString()
Print the full model to a string.
|
String |
toString()
Print a summary of the model.
|
int |
totalNumNodes()
Get total number of nodes, summed over all trees in the forest.
|
public TreeEnsembleModel(scala.Enumeration.Value algo,
DecisionTreeModel[] trees,
double[] treeWeights,
scala.Enumeration.Value combiningStrategy)
public double predict(Vector features)
features - array representing a single data pointpublic RDD<Object> predict(RDD<Vector> features)
features - RDD representing data points to be predictedpublic JavaRDD<Double> predict(JavaRDD<Vector> features)
predict(org.apache.spark.mllib.linalg.Vector).public String toString()
toString in class Objectpublic String toDebugString()
public int numTrees()
public int totalNumNodes()