A node used in a TreeBooster used for gather and storing information about the decision making process.
More...
#include <TreeBoosterNode.h>
|
| static Split | find_best_split_hist (const CNum::DataStructs::Matrix< int > &X, std::shared_ptr< CNum::Data::Shelf[]> shelves, const double *g, const double *h, bool histogram_cache, const arena_view_t &hist_view, DataPartition &partition, double weight_decay=0.0, double reg_lambda=1.0, double gamma=0) |
| | Find the best split at a tree node with the histogram method (maximizing gain).
|
| static Split | find_best_split_greedy (CNum::DataStructs::Matrix< double > &X, const double *g, const double *h, double weight_decay=0.0, double reg_lambda=1.0, double gamma=0) |
| | Find the best split at a tree node with the exact greedy method proposed in Chen & Guestrin's XGBoost (minimizing loss).
|
A node used in a TreeBooster used for gather and storing information about the decision making process.
◆ TreeBoosterNode()
| CNum::Model::Tree::TreeBoosterNode::TreeBoosterNode |
( |
TreeBoosterNode * | left = nullptr, |
|
|
TreeBoosterNode * | right = nullptr ) |
Overloaded default constructor.
- Parameters
-
| left | The left child of the tree |
| right | The right child of the tree |
◆ ~TreeBoosterNode()
| virtual CNum::Model::Tree::TreeBoosterNode::~TreeBoosterNode |
( |
| ) |
|
|
virtual |
◆ find_best_split_greedy()
| Split CNum::Model::Tree::TreeBoosterNode::find_best_split_greedy |
( |
CNum::DataStructs::Matrix< double > & | X, |
|
|
const double * | g, |
|
|
const double * | h, |
|
|
double | weight_decay = 0.0, |
|
|
double | reg_lambda = 1.0, |
|
|
double | gamma = 0 ) |
|
static |
Find the best split at a tree node with the exact greedy method proposed in Chen & Guestrin's XGBoost (minimizing loss).
Available next release
- Parameters
-
| X | The dataset |
| g | The gradient array |
| h | The hessian array |
| weight_decay | A parameter used in deteriming whether or not a splits effect is significant enough to take |
| reg_lambda | Reg Lambda; A regularization parameter |
| gamma | Gamma; A regularization parameter |
- Returns
- The best split
◆ find_best_split_hist()
Find the best split at a tree node with the histogram method (maximizing gain).
- Parameters
-
| X | The dataset |
| shelves | The bins and values associated with their boundaries |
| g | The gradient array |
| h | The hessian array |
| histogram_cache | Whether or not the histograms have already been built |
| hist_view | The view of the histograms |
| partition | The partition of the node's slice of the dataset |
| weight_decay | A parameter used in deteriming whether or not a splits effect is significant enough to take |
| reg_lambda | Reg Lambda; A regularization parameter |
| gamma | Gamma; A regularization parameter |
- Returns
- The best split
◆ to_json_string()
| std::string CNum::Model::Tree::TreeBoosterNode::to_json_string |
( |
| ) |
|
◆ TreeBooster
◆ _left
◆ _right
◆ _split
| Split CNum::Model::Tree::TreeBoosterNode::_split |
◆ _value
| double CNum::Model::Tree::TreeBoosterNode::_value |
The documentation for this class was generated from the following file: