Class RegTreeImpl.Node

java.lang.Object
biz.k11i.xgboost.tree.RegTreeNode
biz.k11i.xgboost.tree.RegTreeImpl.Node
All Implemented Interfaces:
INode<FVec>, Serializable
Enclosing class:
RegTreeImpl

public static class RegTreeImpl.Node extends RegTreeNode implements Serializable
See Also:
  • Field Details

    • parent_

      final int parent_
    • cleft_

      final int cleft_
    • cright_

      final int cright_
    • sindex_

      final int sindex_
    • leaf_value

      final float leaf_value
    • split_cond

      final float split_cond
    • _defaultNext

      private final int _defaultNext
    • _splitIndex

      private final int _splitIndex
    • _isLeaf

      final boolean _isLeaf
  • Constructor Details

  • Method Details

    • isLeaf

      public boolean isLeaf()
      Specified by:
      isLeaf in interface INode<FVec>
    • getSplitIndex

      public int getSplitIndex()
      Specified by:
      getSplitIndex in interface INode<FVec>
      Specified by:
      getSplitIndex in class RegTreeNode
      Returns:
      Index of domain category used to split on the node
    • cdefault

      public int cdefault()
    • default_left

      public boolean default_left()
      Specified by:
      default_left in class RegTreeNode
      Returns:
      True if default direction for unrecognized values is the LEFT child, otherwise false.
    • next

      public int next(FVec feat)
      Specified by:
      next in interface INode<FVec>
    • getParentIndex

      public int getParentIndex()
      Specified by:
      getParentIndex in class RegTreeNode
      Returns:
      Index of node's parent
    • getLeftChildIndex

      public int getLeftChildIndex()
      Specified by:
      getLeftChildIndex in interface INode<FVec>
      Specified by:
      getLeftChildIndex in class RegTreeNode
      Returns:
      Index of node's left child node
    • getRightChildIndex

      public int getRightChildIndex()
      Specified by:
      getRightChildIndex in interface INode<FVec>
      Specified by:
      getRightChildIndex in class RegTreeNode
      Returns:
      Index of node's right child node
    • getSplitCondition

      public float getSplitCondition()
      Specified by:
      getSplitCondition in class RegTreeNode
      Returns:
      Split condition on the node, if the node is a split node. Leaf nodes have this value set to NaN
    • getLeafValue

      public float getLeafValue()
      Specified by:
      getLeafValue in interface INode<FVec>
      Specified by:
      getLeafValue in class RegTreeNode
      Returns:
      Predicted value on the leaf node, if the node is leaf. Otherwise NaN