Package org.apache.spark.ml.tree
Class Node
Object
org.apache.spark.ml.tree.Node
- All Implemented Interfaces:
Serializable
,scala.Serializable
- Direct Known Subclasses:
InternalNode
,LeafNode
Decision tree node interface.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Node
Create a new Node from the old Node format, recursively creating child nodes as needed.abstract double
impurity()
Impurity measure at this node (for training data)abstract double
Prediction a leaf node makes, or which an internal node would make if it were a leaf node
-
Constructor Details
-
Node
public Node()
-
-
Method Details
-
fromOld
public static Node fromOld(Node oldNode, scala.collection.immutable.Map<Object, Object> categoricalFeatures) Create a new Node from the old Node format, recursively creating child nodes as needed.- Parameters:
oldNode
- (undocumented)categoricalFeatures
- (undocumented)- Returns:
- (undocumented)
-
prediction
public abstract double prediction()Prediction a leaf node makes, or which an internal node would make if it were a leaf node -
impurity
public abstract double impurity()Impurity measure at this node (for training data)
-