tree node
More...
#include <tree_model.h>
|
| XGBOOST_DEVICE | Node () |
| |
| | Node (int32_t cleft, int32_t cright, int32_t parent, uint32_t split_ind, float split_cond, bool default_left) |
| |
| XGBOOST_DEVICE int | LeftChild () const |
| | index of left child More...
|
| |
| XGBOOST_DEVICE int | RightChild () const |
| | index of right child More...
|
| |
| XGBOOST_DEVICE int | DefaultChild () const |
| | index of default child when feature is missing More...
|
| |
| XGBOOST_DEVICE bst_feature_t | SplitIndex () const |
| | feature index of split condition More...
|
| |
| XGBOOST_DEVICE bool | DefaultLeft () const |
| | when feature is unknown, whether goes to left child More...
|
| |
| XGBOOST_DEVICE bool | IsLeaf () const |
| | whether current node is leaf node More...
|
| |
| XGBOOST_DEVICE float | LeafValue () const |
| |
| XGBOOST_DEVICE SplitCondT | SplitCond () const |
| |
| XGBOOST_DEVICE int | Parent () const |
| | get parent of the node More...
|
| |
| XGBOOST_DEVICE bool | IsLeftChild () const |
| | whether current node is left child More...
|
| |
| XGBOOST_DEVICE bool | IsDeleted () const |
| | whether this node is deleted More...
|
| |
| XGBOOST_DEVICE bool | IsRoot () const |
| | whether current node is root More...
|
| |
| XGBOOST_DEVICE void | SetLeftChild (int nid) |
| | set the left child More...
|
| |
| XGBOOST_DEVICE void | SetRightChild (int nid) |
| | set the right child More...
|
| |
| XGBOOST_DEVICE void | SetSplit (unsigned split_index, SplitCondT split_cond, bool default_left=false) |
| | set split condition of current node More...
|
| |
| XGBOOST_DEVICE void | SetLeaf (bst_float value, int right=kInvalidNodeId) |
| | set the leaf value of the node More...
|
| |
| XGBOOST_DEVICE void | MarkDelete () |
| | mark that this node is deleted More...
|
| |
| XGBOOST_DEVICE void | Reuse () |
| | Reuse this deleted node. More...
|
| |
| XGBOOST_DEVICE void | SetParent (int pidx, bool is_left_child=true) |
| |
| bool | operator== (const Node &b) const |
| |
| Node | ByteSwap () const |
| |
◆ Node() [1/2]
◆ Node() [2/2]
| xgboost::RegTree::Node::Node |
( |
int32_t |
cleft, |
|
|
int32_t |
cright, |
|
|
int32_t |
parent, |
|
|
uint32_t |
split_ind, |
|
|
float |
split_cond, |
|
|
bool |
default_left |
|
) |
| |
|
inline |
◆ ByteSwap()
| Node xgboost::RegTree::Node::ByteSwap |
( |
| ) |
const |
|
inline |
◆ DefaultChild()
index of default child when feature is missing
◆ DefaultLeft()
when feature is unknown, whether goes to left child
◆ IsDeleted()
whether this node is deleted
◆ IsLeaf()
whether current node is leaf node
◆ IsLeftChild()
whether current node is left child
◆ IsRoot()
whether current node is root
◆ LeafValue()
- Returns
- get leaf value of leaf node
◆ LeftChild()
◆ MarkDelete()
mark that this node is deleted
◆ operator==()
| bool xgboost::RegTree::Node::operator== |
( |
const Node & |
b | ) |
const |
|
inline |
◆ Parent()
◆ Reuse()
◆ RightChild()
◆ SetLeaf()
set the leaf value of the node
- Parameters
-
| value | leaf value |
| right | right index, could be used to store additional information |
◆ SetLeftChild()
set the left child
- Parameters
-
| nid | node id to right child |
◆ SetParent()
| XGBOOST_DEVICE void xgboost::RegTree::Node::SetParent |
( |
int |
pidx, |
|
|
bool |
is_left_child = true |
|
) |
| |
|
inline |
◆ SetRightChild()
set the right child
- Parameters
-
| nid | node id to right child |
◆ SetSplit()
| XGBOOST_DEVICE void xgboost::RegTree::Node::SetSplit |
( |
unsigned |
split_index, |
|
|
SplitCondT |
split_cond, |
|
|
bool |
default_left = false |
|
) |
| |
|
inline |
set split condition of current node
- Parameters
-
| split_index | feature index to split |
| split_cond | split condition |
| default_left | the default direction when feature is unknown |
◆ SplitCond()
- Returns
- get split condition of the node
◆ SplitIndex()
feature index of split condition
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/xgboost/checkouts/release_3.0.0/include/xgboost/tree_model.h