Class Node

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

public abstract class Node extends Object implements Serializable
Decision tree node interface.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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 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

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)