7 #ifndef TREELITE_MODEL_LOADER_H_
8 #define TREELITE_MODEL_LOADER_H_
18 namespace model_loader {
45 std::string
const& filename,
char const* config_json);
55 char const* json_str, std::size_t length,
char const* config_json);
103 int n_targets, std::int64_t
const* node_count, std::int64_t
const** children_left,
104 std::int64_t
const** children_right, std::int64_t
const** feature,
double const** threshold,
105 double const** value, std::int64_t
const** n_node_samples,
106 double const** weighted_n_node_samples,
double const** impurity);
133 std::int64_t
const* node_count, std::int64_t
const** children_left,
134 std::int64_t
const** children_right, std::int64_t
const** feature,
double const** threshold,
135 double const** value, std::int64_t
const** n_node_samples,
136 double const** weighted_n_node_samples,
double const** impurity,
double ratio_c);
166 int n_targets, int32_t
const* n_classes, std::int64_t
const* node_count,
167 std::int64_t
const** children_left, std::int64_t
const** children_right,
168 std::int64_t
const** feature,
double const** threshold,
double const** value,
169 std::int64_t
const** n_node_samples,
double const** weighted_n_node_samples,
170 double const** impurity);
201 std::int64_t
const* node_count, std::int64_t
const** children_left,
202 std::int64_t
const** children_right, std::int64_t
const** feature,
double const** threshold,
203 double const** value, std::int64_t
const** n_node_samples,
204 double const** weighted_n_node_samples,
double const** impurity,
205 double const* baseline_prediction);
237 int n_classes, std::int64_t
const* node_count, std::int64_t
const** children_left,
238 std::int64_t
const** children_right, std::int64_t
const** feature,
double const** threshold,
239 double const** value, std::int64_t
const** n_node_samples,
240 double const** weighted_n_node_samples,
double const** impurity,
241 double const* baseline_prediction);
272 std::int64_t
const* node_count,
void const** nodes,
int expected_sizeof_node_struct,
273 std::uint32_t n_categorical_splits, std::uint32_t
const** raw_left_cat_bitsets,
274 std::uint32_t
const* known_cat_bitsets, std::uint32_t
const* known_cat_bitsets_offset_map,
275 std::int32_t
const* features_map, std::int64_t
const** categories_map,
276 double const* base_scores);
310 int n_classes, int64_t
const* node_count,
void const** nodes,
int expected_sizeof_node_struct,
311 std::uint32_t n_categorical_splits, std::uint32_t
const** raw_left_cat_bitsets,
312 std::uint32_t
const* known_cat_bitsets, std::uint32_t
const* known_cat_bitsets_offset_map,
313 std::int32_t
const* features_map, std::int64_t
const** categories_map,
314 double const* base_scores);
std::unique_ptr< treelite::Model > LoadGradientBoostingRegressor(int n_iter, int n_features, std::int64_t const *node_count, std::int64_t const **children_left, std::int64_t const **children_right, std::int64_t const **feature, double const **threshold, double const **value, std::int64_t const **n_node_samples, double const **weighted_n_node_samples, double const **impurity, double const *baseline_prediction)
Load a scikit-learn GradientBoostingRegressor model from a collection of arrays. Refer to https://sci...
std::unique_ptr< treelite::Model > LoadIsolationForest(int n_estimators, int n_features, std::int64_t const *node_count, std::int64_t const **children_left, std::int64_t const **children_right, std::int64_t const **feature, double const **threshold, double const **value, std::int64_t const **n_node_samples, double const **weighted_n_node_samples, double const **impurity, double ratio_c)
Load a scikit-learn IsolationForest model from a collection of arrays. Refer to https://scikit-learn....
std::unique_ptr< treelite::Model > LoadRandomForestClassifier(int n_estimators, int n_features, int n_targets, int32_t const *n_classes, std::int64_t const *node_count, std::int64_t const **children_left, std::int64_t const **children_right, std::int64_t const **feature, double const **threshold, double const **value, std::int64_t const **n_node_samples, double const **weighted_n_node_samples, double const **impurity)
Load a scikit-learn RandomForestClassifier model from a collection of arrays. Refer to https://scikit...
std::unique_ptr< treelite::Model > LoadHistGradientBoostingClassifier(int n_iter, int n_features, int n_classes, int64_t const *node_count, void const **nodes, int expected_sizeof_node_struct, std::uint32_t n_categorical_splits, std::uint32_t const **raw_left_cat_bitsets, std::uint32_t const *known_cat_bitsets, std::uint32_t const *known_cat_bitsets_offset_map, std::int32_t const *features_map, std::int64_t const **categories_map, double const *base_scores)
Load a scikit-learn HistGradientBoostingClassifier model from a collection of arrays....
std::unique_ptr< treelite::Model > LoadRandomForestRegressor(int n_estimators, int n_features, int n_targets, std::int64_t const *node_count, std::int64_t const **children_left, std::int64_t const **children_right, std::int64_t const **feature, double const **threshold, double const **value, std::int64_t const **n_node_samples, double const **weighted_n_node_samples, double const **impurity)
Load a scikit-learn RandomForestRegressor model from a collection of arrays. Refer to https://scikit-...
std::unique_ptr< treelite::Model > LoadHistGradientBoostingRegressor(int n_iter, int n_features, std::int64_t const *node_count, void const **nodes, int expected_sizeof_node_struct, std::uint32_t n_categorical_splits, std::uint32_t const **raw_left_cat_bitsets, std::uint32_t const *known_cat_bitsets, std::uint32_t const *known_cat_bitsets_offset_map, std::int32_t const *features_map, std::int64_t const **categories_map, double const *base_scores)
Load a scikit-learn HistGradientBoostingRegressor model from a collection of arrays....
std::unique_ptr< treelite::Model > LoadGradientBoostingClassifier(int n_iter, int n_features, int n_classes, std::int64_t const *node_count, std::int64_t const **children_left, std::int64_t const **children_right, std::int64_t const **feature, double const **threshold, double const **value, std::int64_t const **n_node_samples, double const **weighted_n_node_samples, double const **impurity, double const *baseline_prediction)
Load a scikit-learn GradientBoostingClassifier model from a collection of arrays. Refer to https://sc...
std::unique_ptr< treelite::Model > LoadLightGBMModel(std::string const &filename)
load a model file generated by LightGBM (Microsoft/LightGBM). The model file must contain a decision ...
std::unique_ptr< treelite::Model > LoadXGBoostModelLegacyBinary(std::string const &filename)
Load a model file generated by XGBoost (dmlc/xgboost), stored in the legacy binary format.
std::unique_ptr< treelite::Model > LoadXGBoostModel(std::string const &filename, char const *config_json)
Load a model file generated by XGBoost (dmlc/xgboost), stored in the JSON format.
std::unique_ptr< treelite::Model > LoadXGBoostModelFromString(char const *json_str, std::size_t length, char const *config_json)
Load an XGBoost model from a JSON string.
std::unique_ptr< treelite::Model > LoadLightGBMModelFromString(char const *model_str)
Load a LightGBM model from a string. The string should be created with the model_to_string() method i...
Definition: contiguous_array.h:14