Interface Node<T extends Output<T>>

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractTrainingNode, ClassifierTrainingNode, JointRegressorTrainingNode, LeafNode, RegressorTrainingNode, SplitNode

public interface Node<T extends Output<T>> extends Serializable
A node in a decision tree.
  • Method Summary

    Modifier and Type
    Method
    Description
    Copies the node and it's children.
    double
    The impurity score of this node.
    Returns the next node in the tree based on the supplied example, or null if it's a leaf.
    boolean
    Is it a leaf node?
  • Method Details

    • isLeaf

      boolean isLeaf()
      Is it a leaf node?
      Returns:
      True if it's a leaf node.
    • getNextNode

      Node<T> getNextNode(SparseVector example)
      Returns the next node in the tree based on the supplied example, or null if it's a leaf.
      Parameters:
      example - The example.
      Returns:
      The next node down in the tree.
    • getImpurity

      double getImpurity()
      The impurity score of this node.
      Returns:
      The node impurity.
    • copy

      Node<T> copy()
      Copies the node and it's children.
      Returns:
      A deep copy.