Package biz.k11i.xgboost.tree
Class RegTreeImpl.Node
- java.lang.Object
-
- biz.k11i.xgboost.tree.RegTreeNode
-
- biz.k11i.xgboost.tree.RegTreeImpl.Node
-
- Enclosing class:
- RegTreeImpl
public static class RegTreeImpl.Node extends RegTreeNode implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private int_defaultNext(package private) boolean_isLeafprivate int_splitIndex(package private) intcleft_(package private) intcright_(package private) floatleaf_value(package private) intparent_(package private) intsindex_(package private) floatsplit_cond
-
Constructor Summary
Constructors Constructor Description Node(ModelReader reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcdefault()booleandefault_left()floatgetLeafValue()intgetLeftChildIndex()intgetParentIndex()intgetRightChildIndex()floatgetSplitCondition()intgetSplitIndex()booleanisLeaf()intnext(FVec feat)
-
-
-
Constructor Detail
-
Node
Node(ModelReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getSplitIndex
public int getSplitIndex()
- Specified by:
getSplitIndexin interfaceINode<FVec>- Specified by:
getSplitIndexin classRegTreeNode- Returns:
- Index of domain category used to split on the node
-
cdefault
public int cdefault()
-
default_left
public boolean default_left()
- Specified by:
default_leftin classRegTreeNode- Returns:
- True if default direction for unrecognized values is the LEFT child, otherwise false.
-
getParentIndex
public int getParentIndex()
- Specified by:
getParentIndexin classRegTreeNode- Returns:
- Index of node's parent
-
getLeftChildIndex
public int getLeftChildIndex()
- Specified by:
getLeftChildIndexin interfaceINode<FVec>- Specified by:
getLeftChildIndexin classRegTreeNode- Returns:
- Index of node's left child node
-
getRightChildIndex
public int getRightChildIndex()
- Specified by:
getRightChildIndexin interfaceINode<FVec>- Specified by:
getRightChildIndexin classRegTreeNode- Returns:
- Index of node's right child node
-
getSplitCondition
public float getSplitCondition()
- Specified by:
getSplitConditionin classRegTreeNode- 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:
getLeafValuein interfaceINode<FVec>- Specified by:
getLeafValuein classRegTreeNode- Returns:
- Predicted value on the leaf node, if the node is leaf. Otherwise NaN
-
-