Classes | Namespaces | Typedefs | Enumerations | Functions
randomforest.hpp File Reference
#include <cuml/common/logger.hpp>
#include <cuml/ensemble/treelite_defs.hpp>
#include <cuml/tree/decisiontree.hpp>
#include <map>
#include <memory>
Include dependency graph for randomforest.hpp:

Go to the source code of this file.

Classes

struct  ML::RF_metrics
 
struct  ML::RF_params
 
struct  ML::RandomForestMetaData< T, L >
 

Namespaces

 raft
 
 ML
 

Typedefs

typedef RandomForestMetaData< float, int > ML::RandomForestClassifierF
 
typedef RandomForestMetaData< double, int > ML::RandomForestClassifierD
 
typedef RandomForestMetaData< float, float > ML::RandomForestRegressorF
 
typedef RandomForestMetaData< double, double > ML::RandomForestRegressorD
 

Enumerations

enum  ML::RF_type { ML::CLASSIFICATION , ML::REGRESSION }
 
enum  ML::task_category { ML::REGRESSION_MODEL = 1 , ML::CLASSIFICATION_MODEL = 2 }
 

Functions

RF_metrics ML::set_all_rf_metrics (RF_type rf_type, float accuracy, double mean_abs_error, double mean_squared_error, double median_abs_error)
 
RF_metrics ML::set_rf_metrics_classification (float accuracy)
 
RF_metrics ML::set_rf_metrics_regression (double mean_abs_error, double mean_squared_error, double median_abs_error)
 
void ML::print (const RF_metrics rf_metrics)
 
void ML::preprocess_labels (int n_rows, std::vector< int > &labels, std::map< int, int > &labels_map, int verbosity=CUML_LEVEL_INFO)
 
void ML::postprocess_labels (int n_rows, std::vector< int > &labels, std::map< int, int > &labels_map, int verbosity=CUML_LEVEL_INFO)
 
template<class T , class L >
void ML::delete_rf_metadata (RandomForestMetaData< T, L > *forest)
 
template<class T , class L >
std::string ML::get_rf_summary_text (const RandomForestMetaData< T, L > *forest)
 
template<class T , class L >
std::string ML::get_rf_detailed_text (const RandomForestMetaData< T, L > *forest)
 
template<class T , class L >
std::string ML::get_rf_json (const RandomForestMetaData< T, L > *forest)
 
template<class T , class L >
void ML::build_treelite_forest (TreeliteModelHandle *model, const RandomForestMetaData< T, L > *forest, int num_features)
 
TreeliteModelHandle ML::concatenate_trees (std::vector< TreeliteModelHandle > treelite_handles)
 
void ML::fit (const raft::handle_t &user_handle, RandomForestClassifierF *&forest, float *input, int n_rows, int n_cols, int *labels, int n_unique_labels, RF_params rf_params, int verbosity=CUML_LEVEL_INFO)
 
void ML::fit (const raft::handle_t &user_handle, RandomForestClassifierD *&forest, double *input, int n_rows, int n_cols, int *labels, int n_unique_labels, RF_params rf_params, int verbosity=CUML_LEVEL_INFO)
 
void ML::predict (const raft::handle_t &user_handle, const RandomForestClassifierF *forest, const float *input, int n_rows, int n_cols, int *predictions, int verbosity=CUML_LEVEL_INFO)
 
void ML::predict (const raft::handle_t &user_handle, const RandomForestClassifierD *forest, const double *input, int n_rows, int n_cols, int *predictions, int verbosity=CUML_LEVEL_INFO)
 
RF_metrics ML::score (const raft::handle_t &user_handle, const RandomForestClassifierF *forest, const int *ref_labels, int n_rows, const int *predictions, int verbosity=CUML_LEVEL_INFO)
 
RF_metrics ML::score (const raft::handle_t &user_handle, const RandomForestClassifierD *forest, const int *ref_labels, int n_rows, const int *predictions, int verbosity=CUML_LEVEL_INFO)
 
RF_params ML::set_rf_params (int max_depth, int max_leaves, float max_features, int max_n_bins, int min_samples_leaf, int min_samples_split, float min_impurity_decrease, bool bootstrap, int n_trees, float max_samples, uint64_t seed, CRITERION split_criterion, int cfg_n_streams, int max_batch_size)
 
void ML::fit (const raft::handle_t &user_handle, RandomForestRegressorF *&forest, float *input, int n_rows, int n_cols, float *labels, RF_params rf_params, int verbosity=CUML_LEVEL_INFO)
 
void ML::fit (const raft::handle_t &user_handle, RandomForestRegressorD *&forest, double *input, int n_rows, int n_cols, double *labels, RF_params rf_params, int verbosity=CUML_LEVEL_INFO)
 
void ML::predict (const raft::handle_t &user_handle, const RandomForestRegressorF *forest, const float *input, int n_rows, int n_cols, float *predictions, int verbosity=CUML_LEVEL_INFO)
 
void ML::predict (const raft::handle_t &user_handle, const RandomForestRegressorD *forest, const double *input, int n_rows, int n_cols, double *predictions, int verbosity=CUML_LEVEL_INFO)
 
RF_metrics ML::score (const raft::handle_t &user_handle, const RandomForestRegressorF *forest, const float *ref_labels, int n_rows, const float *predictions, int verbosity=CUML_LEVEL_INFO)
 
RF_metrics ML::score (const raft::handle_t &user_handle, const RandomForestRegressorD *forest, const double *ref_labels, int n_rows, const double *predictions, int verbosity=CUML_LEVEL_INFO)