Class RegTreeImpl.Node

    • Field Detail

      • 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 Detail

      • Node

        Node​(ModelReader reader)
        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • isLeaf

        public boolean isLeaf()
        Specified by:
        isLeaf in interface INode<FVec>
      • 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
      • 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