|
CNum 0.2.1
CPU-optimized ML library for C++
|
Utilities used in CNum ML models. More...
Functions | |
| ::std::unique_ptr< CNum::DataStructs::Matrix< double >[] > | train_test_split (const CNum::DataStructs::Matrix< double > &X, const CNum::DataStructs::Matrix< double > &y, double test_percentage=0.2, bool shuffle=true, uint64_t logical_id=0) |
| Split a data set into train and split subsets. | |
| void | print_tree (CNum::Model::Tree::TreeBoosterNode *node, int spaces=10) |
| Print a tree (left to right instead of top down). | |
Utilities used in CNum ML models.
@namesapce CNum::Utils::ModelUtils
| void CNum::Utils::ModelUtils::print_tree | ( | CNum::Model::Tree::TreeBoosterNode * | node, |
| int | spaces = 10 ) |
Print a tree (left to right instead of top down).
| node | A node in a TreeBooster |
| spaces | the amount of spaces to print before the node's value |
| ::std::unique_ptr< CNum::DataStructs::Matrix< double >[] > CNum::Utils::ModelUtils::train_test_split | ( | const CNum::DataStructs::Matrix< double > & | X, |
| const CNum::DataStructs::Matrix< double > & | y, | ||
| double | test_percentage = 0.2, | ||
| bool | shuffle = true, | ||
| uint64_t | logical_id = 0 ) |
Split a data set into train and split subsets.
| X | The dataset |
| y | The labels for the dataset |
| test_percentage | The percentage of the dataset to use for the test subset |
| shuffle | Whether or not to shuffle the dataset |
| logical_id | The logical id of the RNG stream |