Package org.apache.spark.ml.tree
Class DecisionTreeModelReadWrite.NodeData$
Object
org.apache.spark.ml.tree.DecisionTreeModelReadWrite.NodeData$
- All Implemented Interfaces:
Serializable
- Enclosing class:
- DecisionTreeModelReadWrite
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DecisionTreeModelReadWrite.NodeData$
Static reference to the singleton instance of this Scala object. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionscala.Tuple2<scala.collection.immutable.Seq<DecisionTreeModelReadWrite.NodeData>,
Object> CreateDecisionTreeModelReadWrite.NodeData
instances for this node and all children.int
inferNumPartitions
(long numNodes) When save a tree model, infer the number of partitions based on number of nodes.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
NodeData$
public NodeData$()
-
-
Method Details
-
build
public scala.Tuple2<scala.collection.immutable.Seq<DecisionTreeModelReadWrite.NodeData>,Object> build(Node node, int id) CreateDecisionTreeModelReadWrite.NodeData
instances for this node and all children.- Parameters:
id
- Current ID. IDs are assigned via a pre-order traversal.node
- (undocumented)- Returns:
- (sequence of nodes in pre-order traversal order, largest ID in subtree) The nodes are returned in pre-order traversal (root first) so that it is easy to get the ID of the subtree's root node.
-
inferNumPartitions
public int inferNumPartitions(long numNodes) When save a tree model, infer the number of partitions based on number of nodes.- Parameters:
numNodes
- (undocumented)- Returns:
- (undocumented)
-