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 SummaryModifier and TypeMethodDescriptionlonggetLeafField(String leafCol) getTree(int i) 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- 
treesM[] trees()Trees in this ensemble. Warning: These have null parent Estimators.
- 
getTree
- 
treeWeightsdouble[] treeWeights()Weights for each tree, zippable withtrees()
- 
javaTreeWeightsVector javaTreeWeights()Weights used by the python wrappers.
- 
toStringString toString()Summary of the model
- 
toDebugStringString toDebugString()Full description of model
- 
totalNumNodesint 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
- 
getEstimatedSizelong getEstimatedSize()
 
-