OmniSciDB
a5dc49c757
|
#include "MLTableFunctions.hpp"
Go to the source code of this file.
Functions | |
EXTENSION_NOINLINE_HOST int32_t | supported_ml_frameworks__cpu_ (TableFunctionManager &mgr, Column< TextEncodingDict > &output_ml_frameworks, Column< bool > &output_availability, Column< bool > &output_default) |
std::vector< std::string > | get_model_features (const std::string &model_name, const std::shared_ptr< AbstractMLModel > &model) |
EXTENSION_NOINLINE_HOST int32_t | pca_fit__cpu_1 (TableFunctionManager &mgr, const TextEncodingNone &model_name, const ColumnList< TextEncodingDict > &input_cat_features, const int32_t cat_top_k, const float cat_min_fraction, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
EXTENSION_NOINLINE_HOST int32_t | linear_reg_coefs__cpu_1 (TableFunctionManager &mgr, const TextEncodingNone &model_name, Column< int64_t > &output_coef_idx, Column< TextEncodingDict > &output_feature, Column< int64_t > &output_sub_coef_idx, Column< TextEncodingDict > &output_sub_feature, Column< double > &output_coef) |
EXTENSION_NOINLINE_HOST int32_t | linear_reg_coefs__cpu_2 (TableFunctionManager &mgr, const Column< TextEncodingDict > &model_name, Column< int64_t > &output_coef_idx, Column< TextEncodingDict > &output_feature, Column< int64_t > &output_sub_coef_idx, Column< TextEncodingDict > &output_sub_feature, Column< double > &output_coef) |
EXTENSION_NOINLINE_HOST int32_t | random_forest_reg_var_importance__cpu_1 (TableFunctionManager &mgr, const TextEncodingNone &model_name, Column< int64_t > &feature_id, Column< TextEncodingDict > &feature, Column< int64_t > &sub_feature_id, Column< TextEncodingDict > &sub_feature, Column< double > &importance_score) |
EXTENSION_NOINLINE_HOST int32_t | random_forest_reg_var_importance__cpu_2 (TableFunctionManager &mgr, const Column< TextEncodingDict > &model_name, Column< int64_t > &feature_id, Column< TextEncodingDict > &feature, Column< int64_t > &sub_feature_id, Column< TextEncodingDict > &sub_feature, Column< double > &importance_score) |
EXTENSION_NOINLINE_HOST int32_t | get_decision_trees__cpu_1 (TableFunctionManager &mgr, const TextEncodingNone &model_name, Column< int64_t > &tree_id, Column< int64_t > &entry_id, Column< bool > &is_split_node, Column< int64_t > &feature_id, Column< int64_t > &left_child, Column< int64_t > &right_child, Column< double > &value) |
EXTENSION_NOINLINE_HOST int32_t | get_decision_trees__cpu_2 (TableFunctionManager &mgr, const Column< TextEncodingDict > &model_name, Column< int64_t > &tree_id, Column< int64_t > &entry_id, Column< bool > &is_split_node, Column< int64_t > &feature_id, Column< int64_t > &left_child, Column< int64_t > &right_child, Column< double > &value) |
EXTENSION_NOINLINE_HOST void | check_model_params (const std::shared_ptr< AbstractMLModel > &model, const int64_t num_cat_features, const int64_t num_numeric_features) |
EXTENSION_NOINLINE_HOST void check_model_params | ( | const std::shared_ptr< AbstractMLModel > & | model, |
const int64_t | num_cat_features, | ||
const int64_t | num_numeric_features | ||
) |
Definition at line 363 of file MLTableFunctions.cpp.
Referenced by ml_reg_predict__cpu_template(), and r2_score__cpu_template().
EXTENSION_NOINLINE_HOST int32_t get_decision_trees__cpu_1 | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
Column< int64_t > & | tree_id, | ||
Column< int64_t > & | entry_id, | ||
Column< bool > & | is_split_node, | ||
Column< int64_t > & | feature_id, | ||
Column< int64_t > & | left_child, | ||
Column< int64_t > & | right_child, | ||
Column< double > & | value | ||
) |
Definition at line 276 of file MLTableFunctions.cpp.
References g_ml_models, MLModelMap::getModel(), and TableFunctionManager::set_output_row_size().
Referenced by get_decision_trees__cpu_2().
EXTENSION_NOINLINE_HOST int32_t get_decision_trees__cpu_2 | ( | TableFunctionManager & | mgr, |
const Column< TextEncodingDict > & | model_name, | ||
Column< int64_t > & | tree_id, | ||
Column< int64_t > & | entry_id, | ||
Column< bool > & | is_split_node, | ||
Column< int64_t > & | feature_id, | ||
Column< int64_t > & | left_child, | ||
Column< int64_t > & | right_child, | ||
Column< double > & | value | ||
) |
Definition at line 338 of file MLTableFunctions.cpp.
References get_decision_trees__cpu_1(), Column< TextEncodingDict >::getString(), and Column< TextEncodingDict >::size().
std::vector<std::string> get_model_features | ( | const std::string & | model_name, |
const std::shared_ptr< AbstractMLModel > & | model | ||
) |
Definition at line 61 of file MLTableFunctions.cpp.
Referenced by linear_reg_coefs__cpu_1(), and random_forest_reg_var_importance__cpu_1().
EXTENSION_NOINLINE_HOST int32_t linear_reg_coefs__cpu_1 | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
Column< int64_t > & | output_coef_idx, | ||
Column< TextEncodingDict > & | output_feature, | ||
Column< int64_t > & | output_sub_coef_idx, | ||
Column< TextEncodingDict > & | output_sub_feature, | ||
Column< double > & | output_coef | ||
) |
Definition at line 88 of file MLTableFunctions.cpp.
References g_ml_models, get_model_features(), MLModelMap::getModel(), Column< TextEncodingDict >::getOrAddTransient(), and TableFunctionManager::set_output_row_size().
Referenced by linear_reg_coefs__cpu_2().
EXTENSION_NOINLINE_HOST int32_t linear_reg_coefs__cpu_2 | ( | TableFunctionManager & | mgr, |
const Column< TextEncodingDict > & | model_name, | ||
Column< int64_t > & | output_coef_idx, | ||
Column< TextEncodingDict > & | output_feature, | ||
Column< int64_t > & | output_sub_coef_idx, | ||
Column< TextEncodingDict > & | output_sub_feature, | ||
Column< double > & | output_coef | ||
) |
Definition at line 153 of file MLTableFunctions.cpp.
References Column< TextEncodingDict >::getString(), linear_reg_coefs__cpu_1(), and Column< TextEncodingDict >::size().
EXTENSION_NOINLINE_HOST int32_t pca_fit__cpu_1 | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const int32_t | cat_top_k, | ||
const float | cat_min_fraction, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 68 of file MLTableFunctions.cpp.
References CategoricalFeaturesBuilder< T >::getCatFeatureKeys(), CategoricalFeaturesBuilder< T >::getFeatures(), and pca_fit_impl().
EXTENSION_NOINLINE_HOST int32_t random_forest_reg_var_importance__cpu_1 | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
Column< int64_t > & | feature_id, | ||
Column< TextEncodingDict > & | feature, | ||
Column< int64_t > & | sub_feature_id, | ||
Column< TextEncodingDict > & | sub_feature, | ||
Column< double > & | importance_score | ||
) |
Definition at line 174 of file MLTableFunctions.cpp.
References g_ml_models, get_model_features(), MLModelMap::getModel(), Column< TextEncodingDict >::getOrAddTransient(), and TableFunctionManager::set_output_row_size().
Referenced by random_forest_reg_var_importance__cpu_2().
EXTENSION_NOINLINE_HOST int32_t random_forest_reg_var_importance__cpu_2 | ( | TableFunctionManager & | mgr, |
const Column< TextEncodingDict > & | model_name, | ||
Column< int64_t > & | feature_id, | ||
Column< TextEncodingDict > & | feature, | ||
Column< int64_t > & | sub_feature_id, | ||
Column< TextEncodingDict > & | sub_feature, | ||
Column< double > & | importance_score | ||
) |
Definition at line 255 of file MLTableFunctions.cpp.
References Column< TextEncodingDict >::getString(), random_forest_reg_var_importance__cpu_1(), and Column< TextEncodingDict >::size().
EXTENSION_NOINLINE_HOST int32_t supported_ml_frameworks__cpu_ | ( | TableFunctionManager & | mgr, |
Column< TextEncodingDict > & | output_ml_frameworks, | ||
Column< bool > & | output_availability, | ||
Column< bool > & | output_default | ||
) |
Definition at line 8 of file MLTableFunctions.cpp.
References StringDictionaryProxy::getOrAddTransientBulk(), TableFunctionManager::set_output_row_size(), and Column< TextEncodingDict >::string_dict_proxy_.