Classes | |
struct | DecisionTreeParams |
struct | TreeMetaDataNode |
struct | Dataset |
struct | Quantiles |
class | TreeliteType |
class | TreeliteType< float > |
class | TreeliteType< double > |
class | TreeliteType< uint32_t > |
class | TreeliteType< int > |
Typedefs | |
typedef TreeMetaDataNode< float, int > | TreeClassifierF |
typedef TreeMetaDataNode< double, int > | TreeClassifierD |
typedef TreeMetaDataNode< float, float > | TreeRegressorF |
typedef TreeMetaDataNode< double, double > | TreeRegressorD |
Functions | |
void | set_tree_params (DecisionTreeParams ¶ms, int cfg_max_depth=-1, int cfg_max_leaves=-1, float cfg_max_features=1.0f, int cfg_max_n_bins=128, int cfg_min_samples_leaf=1, int cfg_min_samples_split=2, float cfg_min_impurity_decrease=0.0f, CRITERION cfg_split_criterion=CRITERION_END, int cfg_max_batch_size=4096) |
Set all DecisionTreeParams members. More... | |
template<class T , class L > | |
std::string | get_tree_summary_text (const TreeMetaDataNode< T, L > *tree) |
Obtain high-level tree information. More... | |
template<class T , class L > | |
std::string | get_tree_text (const TreeMetaDataNode< T, L > *tree) |
Obtain detailed tree information. More... | |
template<class T , class L > | |
std::string | get_tree_json (const TreeMetaDataNode< T, L > *tree) |
Export tree as a JSON string. More... | |
typedef TreeMetaDataNode<double, int> ML::DT::TreeClassifierD |
typedef TreeMetaDataNode<float, int> ML::DT::TreeClassifierF |
typedef TreeMetaDataNode<double, double> ML::DT::TreeRegressorD |
typedef TreeMetaDataNode<float, float> ML::DT::TreeRegressorF |
std::string ML::DT::get_tree_json | ( | const TreeMetaDataNode< T, L > * | tree | ) |
Export tree as a JSON string.
T | data type for input data (float or double). |
L | data type for labels (int type for classification, T type for regression). |
[in] | tree | CPU pointer to TreeMetaDataNode |
std::string ML::DT::get_tree_summary_text | ( | const TreeMetaDataNode< T, L > * | tree | ) |
Obtain high-level tree information.
T | data type for input data (float or double). |
L | data type for labels (int type for classification, T type for regression). |
[in] | tree | CPU pointer to TreeMetaDataNode |
std::string ML::DT::get_tree_text | ( | const TreeMetaDataNode< T, L > * | tree | ) |
Obtain detailed tree information.
T | data type for input data (float or double). |
L | data type for labels (int type for classification, T type for regression). |
[in] | tree | CPU pointer to TreeMetaDataNode |
void ML::DT::set_tree_params | ( | DecisionTreeParams & | params, |
int | cfg_max_depth = -1 , |
||
int | cfg_max_leaves = -1 , |
||
float | cfg_max_features = 1.0f , |
||
int | cfg_max_n_bins = 128 , |
||
int | cfg_min_samples_leaf = 1 , |
||
int | cfg_min_samples_split = 2 , |
||
float | cfg_min_impurity_decrease = 0.0f , |
||
CRITERION | cfg_split_criterion = CRITERION_END , |
||
int | cfg_max_batch_size = 4096 |
||
) |
Set all DecisionTreeParams members.
[in,out] | params | update with tree parameters |
[in] | cfg_max_depth | maximum tree depth; default -1 |
[in] | cfg_max_leaves | maximum leaves; default -1 |
[in] | cfg_max_features | maximum number of features; default 1.0f |
[in] | cfg_max_n_bins | maximum number of bins; default 128 |
[in] | cfg_min_samples_leaf | min. rows in each leaf node; default 1 |
[in] | cfg_min_samples_split | min. rows needed to split an internal node; default 2 |
[in] | cfg_min_impurity_decrease | split a node only if its reduction in impurity is more than this value |
[in] | cfg_split_criterion | split criterion; default CRITERION_END, i.e., GINI for classification or MSE for regression |
[in] | cfg_max_batch_size | Maximum number of nodes that can be processed in a batch. This is used only for batched-level algo. Default value 4096. |