org.apache.spark.ml.tree
Class Node

Object
  extended by org.apache.spark.ml.tree.Node
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
InternalNode, LeafNode

public abstract class Node
extends Object
implements scala.Serializable

:: DeveloperApi :: Decision tree node interface.

See Also:
Serialized Form

Constructor Summary
Node()
           
 
Method Summary
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.
abstract  double impurity()
          Impurity measure at this node (for training data)
abstract  double prediction()
          Prediction a leaf node makes, or which an internal node would make if it were a leaf node
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node()
Method Detail

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)