Treelite
|
tree node More...
#include <tree.h>
Classes | |
union | Info |
store either leaf value or decision threshold More... | |
Public Member Functions | |
void | Init () |
Initialization method. Use this in lieu of constructor (POD types cannot have a non-trivial constructor) | |
int | LeftChild () const |
Getters. | |
int | RightChild () const |
bool | DefaultLeft () const |
int | DefaultChild () const |
std::uint32_t | SplitIndex () const |
bool | IsLeaf () const |
LeafOutputType | LeafValue () const |
ThresholdType | Threshold () const |
Operator | ComparisonOp () const |
SplitFeatureType | SplitType () const |
bool | HasDataCount () const |
std::uint64_t | DataCount () const |
bool | HasSumHess () const |
double | SumHess () const |
bool | HasGain () const |
double | Gain () const |
bool | CategoriesListRightChild () const |
Public Attributes | |
std::int32_t | cleft_ |
pointer to left and right children | |
std::int32_t | cright_ |
std::uint32_t | sindex_ |
feature index used for the split highest bit indicates default direction for missing values | |
Info | info_ |
storage for leaf value or decision threshold | |
std::uint64_t | data_count_ |
number of data points whose traversal paths include this node. LightGBM models natively store this statistics. | |
double | sum_hess_ |
sum of hessian values for all data points whose traversal paths include this node. This value is generally correlated positively with the data count. XGBoost models natively store this statistics. | |
double | gain_ |
change in loss that is attributed to a particular split | |
SplitFeatureType | split_type_ |
feature split type | |
Operator | cmp_ |
operator to use for expression of form [fval] OP [threshold]. If the expression evaluates to true, take the left child; otherwise, take the right child. | |
bool | data_count_present_ |
whether data_count_ field is present | |
bool | sum_hess_present_ |
whether sum_hess_ field is present | |
bool | gain_present_ |
whether gain_present_ field is present | |
bool | categories_list_right_child_ |
tree node