|
CNum 0.2.1
CPU-optimized ML library for C++
|
Tree-based models. More...
Classes | |
| class | GBModel |
| A gradient-boosting model for any child of the TreeBooster class. More... | |
| class | TreeBooster |
| A decision tree used in various gradient-boosting models as a weak learner. More... | |
| class | TreeBoosterNode |
| A node used in a TreeBooster used for gather and storing information about the decision making process. More... | |
| struct | Histogram |
| Holds the total gradients and hessians for all bins. More... | |
| struct | DataPartition |
| A data partition for the set of samples a tree node has to work with during the tree building process. More... | |
| struct | Split |
| Holds data associated with the decision making process in a TreeBoosterNode. More... | |
| class | XGTreeBooster |
| A tree booster modeled after Chen & Guestrin's XGBoost tree booster. More... | |
Typedefs | |
| using | json = ::nlohmann::json |
| using | SubsampleFunction = ::std::function< void(size_t *, size_t, size_t, size_t, ::CNum::DataStructs::Matrix<double>) > |
| using | SplitValuePair = std::pair<double, double> |
| using | DataMatrix = std::variant< CNum::DataStructs::Matrix<int>, CNum::DataStructs::Matrix<double> > |
Enumerations | |
| enum | SplitAlg { GREEDY , HIST } |
| The algorithm used for tree finding splits in tree building. More... | |
| enum | split_dir { LEFT , RIGHT } |
| Signifies the direction of a node resultant of a split in relation to its parent. More... | |
Variables | |
| SubsampleFunction | default_subsample |
| constexpr int | N_BINS = 256 |
| Number of bins used in the Tree models. | |
Tree-based models.
| using CNum::Model::Tree::DataMatrix = std::variant< CNum::DataStructs::Matrix<int>, CNum::DataStructs::Matrix<double> > |
| using CNum::Model::Tree::json = ::nlohmann::json |
| using CNum::Model::Tree::SplitValuePair = std::pair<double, double> |
| using CNum::Model::Tree::SubsampleFunction = ::std::function< void(size_t *, size_t, size_t, size_t, ::CNum::DataStructs::Matrix<double>) > |
|
inline |
|
constexpr |
Number of bins used in the Tree models.
The value 256 was chosen for vgather optimizations. If there are 256 bins then the bin number fits in one byte, and we can gather more gradients and hessians associated with bin numbers in parrallel when searching for the best split.