Package org.apache.spark.ml.tree
Class DecisionTreeModelReadWrite
Object
org.apache.spark.ml.tree.DecisionTreeModelReadWrite
Helper classes for tree model persistence
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic NodebuildTreeFromNodes(DecisionTreeModelReadWrite.NodeData[] data, String impurityType) Given all data for all nodes in a tree, rebuild the tree.static NodeloadTreeNodes(String path, org.apache.spark.ml.util.DefaultParamsReader.Metadata metadata, SparkSession sparkSession) Load a decision tree from a file.
- 
Constructor Details- 
DecisionTreeModelReadWritepublic DecisionTreeModelReadWrite()
 
- 
- 
Method Details- 
loadTreeNodespublic static Node loadTreeNodes(String path, org.apache.spark.ml.util.DefaultParamsReader.Metadata metadata, SparkSession sparkSession) Load a decision tree from a file.- Parameters:
- path- (undocumented)
- metadata- (undocumented)
- sparkSession- (undocumented)
- Returns:
- Root node of reconstructed tree
 
- 
buildTreeFromNodespublic static Node buildTreeFromNodes(DecisionTreeModelReadWrite.NodeData[] data, String impurityType) Given all data for all nodes in a tree, rebuild the tree.- Parameters:
- data- Unsorted node data
- impurityType- Impurity type for this tree
- Returns:
- Root node of reconstructed tree
 
 
-