Package org.apache.spark.ml.tree
Interface TreeEnsembleModel<M extends DecisionTreeModel>
- Type Parameters:
M- Type of tree model in this ensemble
- All Known Implementing Classes:
GBTClassificationModel,GBTRegressionModel,RandomForestClassificationModel,RandomForestRegressionModel
public interface TreeEnsembleModel<M extends DecisionTreeModel>
Abstraction for models which are ensembles of decision trees
-
Method Summary
Modifier and TypeMethodDescriptiongetLeafField(String leafCol) Weights used by the python wrappers.predictLeaf(Vector features) Full description of modeltoString()Summary of the modelintTotal number of nodes, summed over all trees in the ensemble.M[]trees()Trees in this ensemble.double[]Weights for each tree, zippable withtrees()
-
Method Details
-
trees
M[] trees()Trees in this ensemble. Warning: These have null parent Estimators. -
treeWeights
double[] treeWeights()Weights for each tree, zippable withtrees() -
javaTreeWeights
Vector javaTreeWeights()Weights used by the python wrappers. -
toString
String toString()Summary of the model -
toDebugString
String toDebugString()Full description of model -
totalNumNodes
int totalNumNodes()Total number of nodes, summed over all trees in the ensemble. -
predictLeaf
- Parameters:
features- (undocumented)- Returns:
- The indices of the leaves corresponding to the feature vector. Leaves are indexed in pre-order from 0.
-
getLeafField
-