OmniSciDB
a5dc49c757
|
#include "QueryEngine/TableFunctions/SystemFunctions/os/ML/MLTableFunctionsCommon.h"
#include "QueryEngine/TableFunctions/SystemFunctions/os/Shared/NullRowsRemoval.h"
#include "QueryEngine/heavydbTypes.h"
#include "QueryEngine/TableFunctions/SystemFunctions/os/ML/MLModel.h"
#include "QueryEngine/TableFunctions/SystemFunctions/os/ML/OneHotEncoder.h"
#include <tbb/parallel_for.h>
#include <tbb/task_arena.h>
Go to the source code of this file.
Classes | |
struct | CategoricalFeaturesBuilder< T > |
Functions | |
template<typename T > | |
std::vector< const T * > | pluck_ptrs (const std::vector< std::vector< T >> &data, const int64_t start_idx, const int64_t end_idx) |
template<typename T > | |
std::vector< const T * > | pluck_ptrs (const std::vector< T * > &data, const int64_t start_idx, const int64_t end_idx) |
EXTENSION_NOINLINE_HOST int32_t | supported_ml_frameworks__cpu_ (TableFunctionManager &mgr, Column< TextEncodingDict > &output_ml_frameworks, Column< bool > &output_availability, Column< bool > &output_default) |
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) |
template<typename K , typename T > | |
NEVER_INLINE HOST int32_t | kmeans__cpu_template (TableFunctionManager &mgr, const Column< K > &input_ids, const ColumnList< T > &input_features, const int num_clusters, const int num_iterations, const TextEncodingNone &init_type_str, const TextEncodingNone &preferred_ml_framework_str, Column< K > &output_ids, Column< int32_t > &output_clusters) |
template<typename K , typename T > | |
NEVER_INLINE HOST int32_t | dbscan__cpu_template (TableFunctionManager &mgr, const Column< K > &input_ids, const ColumnList< T > &input_features, const double epsilon, const int32_t min_observations, const TextEncodingNone &preferred_ml_framework_str, Column< K > &output_ids, Column< int32_t > &output_clusters) |
template<typename T > | |
NEVER_INLINE HOST int32_t | linear_reg_fit_impl (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< T > &input_features, const std::vector< std::vector< std::string >> &cat_feature_keys, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
template<typename T > | |
NEVER_INLINE HOST int32_t | linear_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< T > &input_features, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
template<typename T > | |
NEVER_INLINE HOST int32_t | linear_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< TextEncodingDict > &input_cat_features, const ColumnList< T > &input_numeric_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) |
template<typename T > | |
NEVER_INLINE HOST int32_t | linear_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, 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) |
template<typename T > | |
Column< T > | create_wrapper_col (std::vector< T > &col_vec) |
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) |
template<typename T > | |
NEVER_INLINE HOST int32_t | decision_tree_reg_impl (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< T > &input_features, const std::vector< std::vector< std::string >> &cat_feature_keys, const int64_t max_tree_depth, const int64_t min_observations_per_leaf_node, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
template<typename T > | |
NEVER_INLINE HOST int32_t | decision_tree_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< T > &input_features, const int64_t max_tree_depth, const int64_t min_observations_per_leaf_node, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
template<typename T > | |
NEVER_INLINE HOST int32_t | decision_tree_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< TextEncodingDict > &input_cat_features, const ColumnList< T > &input_numeric_features, const int64_t max_tree_depth, const int64_t min_observations_per_leaf_node, 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) |
template<typename T > | |
NEVER_INLINE HOST int32_t | decision_tree_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< TextEncodingDict > &input_cat_features, const int64_t max_tree_depth, const int64_t min_observations_per_leaf_node, 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) |
template<typename T > | |
NEVER_INLINE HOST int32_t | gbt_reg_fit_impl (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< T > &input_features, const std::vector< std::vector< std::string >> &cat_feature_keys, const int64_t max_iterations, const int64_t max_tree_depth, const double shrinkage, const double min_split_loss, const double lambda, const double obs_per_tree_fraction, const int64_t features_per_node, const int64_t min_observations_per_leaf_node, const int64_t max_bins, const int64_t min_bin_size, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
template<typename T > | |
NEVER_INLINE HOST int32_t | gbt_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< T > &input_features, const int64_t max_iterations, const int64_t max_tree_depth, const double shrinkage, const double min_split_loss, const double lambda, const double obs_per_tree_fraction, const int64_t features_per_node, const int64_t min_observations_per_leaf_node, const int64_t max_bins, const int64_t min_bin_size, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
template<typename T > | |
NEVER_INLINE HOST int32_t | gbt_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< TextEncodingDict > &input_cat_features, const ColumnList< T > &input_numeric_features, const int64_t max_iterations, const int64_t max_tree_depth, const double shrinkage, const double min_split_loss, const double lambda, const double obs_per_tree_fraction, const int64_t features_per_node, const int64_t min_observations_per_leaf_node, const int64_t max_bins, const int64_t min_bin_size, 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) |
template<typename T > | |
NEVER_INLINE HOST int32_t | gbt_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< TextEncodingDict > &input_cat_features, const int64_t max_iterations, const int64_t max_tree_depth, const double shrinkage, const double min_split_loss, const double lambda, const double obs_per_tree_fraction, const int64_t features_per_node, const int64_t min_observations_per_leaf_node, const int64_t max_bins, const int64_t min_bin_size, 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) |
template<typename T > | |
NEVER_INLINE HOST int32_t | random_forest_reg_fit_impl (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< T > &input_features, const std::vector< std::vector< std::string >> &cat_feature_keys, const int64_t num_trees, const double obs_per_tree_fraction, const int64_t max_tree_depth, const int64_t features_per_node, const double impurity_threshold, const bool bootstrap, const int64_t min_obs_per_leaf_node, const int64_t min_obs_per_split_node, const double min_weight_fraction_in_leaf_node, const double min_impurity_decrease_in_split_node, const int64_t max_leaf_nodes, const bool use_histogram, const TextEncodingNone &var_importance_metric_str, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
template<typename T > | |
NEVER_INLINE HOST int32_t | random_forest_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< T > &input_features, const int64_t num_trees, const double obs_per_tree_fraction, const int64_t max_tree_depth, const int64_t features_per_node, const double impurity_threshold, const bool bootstrap, const int64_t min_obs_per_leaf_node, const int64_t min_obs_per_split_node, const double min_weight_fraction_in_leaf_node, const double min_impurity_decrease_in_split_node, const int64_t max_leaf_nodes, const bool use_histogram, const TextEncodingNone &var_importance_metric_str, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
template<typename T > | |
NEVER_INLINE HOST int32_t | random_forest_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< TextEncodingDict > &input_cat_features, const ColumnList< T > &input_numeric_features, const int64_t num_trees, const double obs_per_tree_fraction, const int64_t max_tree_depth, const int64_t features_per_node, const double impurity_threshold, const bool bootstrap, const int64_t min_obs_per_leaf_node, const int64_t min_obs_per_split_node, const double min_weight_fraction_in_leaf_node, const double min_impurity_decrease_in_split_node, const int64_t max_leaf_nodes, const bool use_histogram, const TextEncodingNone &var_importance_metric_str, 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) |
template<typename T > | |
NEVER_INLINE HOST int32_t | random_forest_reg_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< TextEncodingDict > &input_cat_features, const int64_t num_trees, const double obs_per_tree_fraction, const int64_t max_tree_depth, const int64_t features_per_node, const double impurity_threshold, const bool bootstrap, const int64_t min_obs_per_leaf_node, const int64_t min_obs_per_split_node, const double min_weight_fraction_in_leaf_node, const double min_impurity_decrease_in_split_node, const int64_t max_leaf_nodes, const bool use_histogram, const TextEncodingNone &var_importance_metric_str, 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) |
template<typename T > | |
NEVER_INLINE HOST int32_t | pca_fit_impl (TableFunctionManager &mgr, const TextEncodingNone &model_name, const ColumnList< T > &input_features, const std::vector< std::vector< std::string >> &cat_feature_keys, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
template<typename T > | |
NEVER_INLINE HOST int32_t | pca_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const ColumnList< T > &input_features, const TextEncodingNone &preferred_ml_framework_str, const TextEncodingNone &model_metadata, Column< TextEncodingDict > &output_model_name) |
template<typename T > | |
NEVER_INLINE HOST int32_t | pca_fit__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const ColumnList< TextEncodingDict > &input_cat_features, const ColumnList< T > &input_numeric_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 | 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) |
template<typename T , typename K > | |
NEVER_INLINE HOST int32_t | ml_reg_predict_impl (TableFunctionManager &mgr, const std::shared_ptr< AbstractMLModel > &model, const Column< K > &input_ids, const ColumnList< T > &input_features, const TextEncodingNone &preferred_ml_framework_str, Column< K > &output_ids, Column< T > &output_predictions) |
template<typename T , typename K > | |
NEVER_INLINE HOST int32_t | ml_reg_predict__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< K > &input_ids, const ColumnList< T > &input_features, const TextEncodingNone &preferred_ml_framework_str, Column< K > &output_ids, Column< T > &output_predictions) |
template<typename T , typename K > | |
NEVER_INLINE HOST int32_t | ml_reg_predict__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< K > &input_ids, const ColumnList< TextEncodingDict > &input_cat_features, const ColumnList< T > &input_numeric_features, const TextEncodingNone &preferred_ml_framework_str, Column< K > &output_ids, Column< T > &output_predictions) |
template<typename T , typename K > | |
NEVER_INLINE HOST int32_t | ml_reg_predict__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< K > &input_ids, const ColumnList< TextEncodingDict > &input_cat_features, const TextEncodingNone &preferred_ml_framework_str, Column< K > &output_ids, Column< T > &output_predictions) |
template<typename T , typename K > | |
NEVER_INLINE HOST int32_t | ml_reg_predict__cpu_template (TableFunctionManager &mgr, const Column< TextEncodingDict > &model_name, const Column< K > &input_ids, const ColumnList< T > &input_features, const TextEncodingNone &preferred_ml_framework_str, Column< K > &output_ids, Column< T > &output_predictions) |
template<typename T , typename K > | |
NEVER_INLINE HOST int32_t | ml_reg_predict__cpu_template (TableFunctionManager &mgr, const Column< TextEncodingDict > &model_name, const Column< K > &input_ids, const ColumnList< TextEncodingDict > &input_cat_features, const ColumnList< T > &input_numeric_features, const TextEncodingNone &preferred_ml_framework_str, Column< K > &output_ids, Column< T > &output_predictions) |
template<typename T , typename K > | |
NEVER_INLINE HOST int32_t | ml_reg_predict__cpu_template (TableFunctionManager &mgr, const Column< TextEncodingDict > &model_name, const Column< K > &input_ids, const ColumnList< TextEncodingDict > &input_cat_features, const TextEncodingNone &preferred_ml_framework_str, Column< K > &output_ids, Column< T > &output_predictions) |
template<typename T > | |
NEVER_INLINE HOST int32_t | r2_score_impl (TableFunctionManager &mgr, const std::shared_ptr< AbstractMLModel > &model, const Column< T > &input_labels, const ColumnList< T > &input_features, Column< double > &output_r2) |
template<typename T > | |
NEVER_INLINE HOST int32_t | r2_score__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< T > &input_features, Column< double > &output_r2) |
template<typename T > | |
NEVER_INLINE HOST int32_t | r2_score__cpu_template (TableFunctionManager &mgr, const Column< TextEncodingDict > &model_name, const Column< T > &input_labels, const ColumnList< T > &input_features, Column< double > &output_r2) |
template<typename T > | |
NEVER_INLINE HOST int32_t | r2_score__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< TextEncodingDict > &input_cat_features, const ColumnList< T > &input_numeric_features, Column< double > &output_r2) |
template<typename T > | |
NEVER_INLINE HOST int32_t | r2_score__cpu_template (TableFunctionManager &mgr, const TextEncodingNone &model_name, const Column< T > &input_labels, const ColumnList< TextEncodingDict > &input_cat_features, Column< double > &output_r2) |
template<typename T > | |
NEVER_INLINE HOST int32_t | r2_score__cpu_template (TableFunctionManager &mgr, const Column< TextEncodingDict > &model_name, const Column< T > &input_labels, const ColumnList< TextEncodingDict > &input_cat_features, const ColumnList< T > &input_numeric_features, Column< double > &output_r2) |
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 | ||
) |
Definition at line 363 of file MLTableFunctions.cpp.
Referenced by ml_reg_predict__cpu_template(), and r2_score__cpu_template().
Column<T> create_wrapper_col | ( | std::vector< T > & | col_vec | ) |
Definition at line 594 of file MLTableFunctions.hpp.
NEVER_INLINE HOST int32_t dbscan__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< K > & | input_ids, | ||
const ColumnList< T > & | input_features, | ||
const double | epsilon, | ||
const int32_t | min_observations, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< int32_t > & | output_clusters | ||
) |
Definition at line 204 of file MLTableFunctions.hpp.
References DEFAULT, TableFunctions_Namespace::denull_data(), get_ml_framework(), TextEncodingNone::getString(), INVALID, MLPACK, ONEAPI, ONEDAL, pluck_ptrs(), Column< T >::ptr_, TableFunctionManager::set_output_row_size(), Column< T >::size(), TableFunctions_Namespace::unmask_data(), and z_std_normalize_data().
NEVER_INLINE HOST int32_t decision_tree_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
const int64_t | max_tree_depth, | ||
const int64_t | min_observations_per_leaf_node, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 717 of file MLTableFunctions.hpp.
References decision_tree_reg_impl().
NEVER_INLINE HOST int32_t decision_tree_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const ColumnList< T > & | input_numeric_features, | ||
const int64_t | max_tree_depth, | ||
const int64_t | min_observations_per_leaf_node, | ||
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 755 of file MLTableFunctions.hpp.
References decision_tree_reg_impl(), CategoricalFeaturesBuilder< T >::getCatFeatureKeys(), and CategoricalFeaturesBuilder< T >::getFeatures().
NEVER_INLINE HOST int32_t decision_tree_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const int64_t | max_tree_depth, | ||
const int64_t | min_observations_per_leaf_node, | ||
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 802 of file MLTableFunctions.hpp.
References decision_tree_reg_impl(), CategoricalFeaturesBuilder< T >::getCatFeatureKeys(), and CategoricalFeaturesBuilder< T >::getFeatures().
NEVER_INLINE HOST int32_t decision_tree_reg_impl | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
const std::vector< std::vector< std::string >> & | cat_feature_keys, | ||
const int64_t | max_tree_depth, | ||
const int64_t | min_observations_per_leaf_node, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 639 of file MLTableFunctions.hpp.
References DEFAULT, TableFunctions_Namespace::denull_data(), get_ml_framework(), Column< TextEncodingDict >::getOrAddTransient(), TextEncodingNone::getString(), INVALID, MLPACK, ColumnList< T >::numCols(), ONEDAL, pluck_ptrs(), TableFunctionManager::set_output_row_size(), and Column< T >::size().
Referenced by decision_tree_reg_fit__cpu_template().
NEVER_INLINE HOST int32_t gbt_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
const int64_t | max_iterations, | ||
const int64_t | max_tree_depth, | ||
const double | shrinkage, | ||
const double | min_split_loss, | ||
const double | lambda, | ||
const double | obs_per_tree_fraction, | ||
const int64_t | features_per_node, | ||
const int64_t | min_observations_per_leaf_node, | ||
const int64_t | max_bins, | ||
const int64_t | min_bin_size, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 930 of file MLTableFunctions.hpp.
References gbt_reg_fit_impl().
NEVER_INLINE HOST int32_t gbt_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const ColumnList< T > & | input_numeric_features, | ||
const int64_t | max_iterations, | ||
const int64_t | max_tree_depth, | ||
const double | shrinkage, | ||
const double | min_split_loss, | ||
const double | lambda, | ||
const double | obs_per_tree_fraction, | ||
const int64_t | features_per_node, | ||
const int64_t | min_observations_per_leaf_node, | ||
const int64_t | max_bins, | ||
const int64_t | min_bin_size, | ||
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 993 of file MLTableFunctions.hpp.
References gbt_reg_fit_impl(), CategoricalFeaturesBuilder< T >::getCatFeatureKeys(), and CategoricalFeaturesBuilder< T >::getFeatures().
NEVER_INLINE HOST int32_t gbt_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const int64_t | max_iterations, | ||
const int64_t | max_tree_depth, | ||
const double | shrinkage, | ||
const double | min_split_loss, | ||
const double | lambda, | ||
const double | obs_per_tree_fraction, | ||
const int64_t | features_per_node, | ||
const int64_t | min_observations_per_leaf_node, | ||
const int64_t | max_bins, | ||
const int64_t | min_bin_size, | ||
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 1063 of file MLTableFunctions.hpp.
References gbt_reg_fit_impl(), CategoricalFeaturesBuilder< T >::getCatFeatureKeys(), and CategoricalFeaturesBuilder< T >::getFeatures().
NEVER_INLINE HOST int32_t gbt_reg_fit_impl | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
const std::vector< std::vector< std::string >> & | cat_feature_keys, | ||
const int64_t | max_iterations, | ||
const int64_t | max_tree_depth, | ||
const double | shrinkage, | ||
const double | min_split_loss, | ||
const double | lambda, | ||
const double | obs_per_tree_fraction, | ||
const int64_t | features_per_node, | ||
const int64_t | min_observations_per_leaf_node, | ||
const int64_t | max_bins, | ||
const int64_t | min_bin_size, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 831 of file MLTableFunctions.hpp.
References DEFAULT, TableFunctions_Namespace::denull_data(), get_ml_framework(), Column< TextEncodingDict >::getOrAddTransient(), TextEncodingNone::getString(), INVALID, MLPACK, ColumnList< T >::numCols(), ONEDAL, pluck_ptrs(), TableFunctionManager::set_output_row_size(), and Column< T >::size().
Referenced by gbt_reg_fit__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().
NEVER_INLINE HOST int32_t kmeans__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< K > & | input_ids, | ||
const ColumnList< T > & | input_features, | ||
const int | num_clusters, | ||
const int | num_iterations, | ||
const TextEncodingNone & | init_type_str, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< int32_t > & | output_clusters | ||
) |
Definition at line 103 of file MLTableFunctions.hpp.
References DEFAULT, TableFunctions_Namespace::denull_data(), get_kmeans_init_type(), get_ml_framework(), TextEncodingNone::getString(), INVALID, MLPACK, ONEAPI, ONEDAL, pluck_ptrs(), Column< T >::ptr_, TableFunctionManager::set_output_row_size(), Column< T >::size(), TableFunctions_Namespace::unmask_data(), and z_std_normalize_data().
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().
NEVER_INLINE HOST int32_t linear_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 366 of file MLTableFunctions.hpp.
References linear_reg_fit_impl().
NEVER_INLINE HOST int32_t linear_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const ColumnList< T > & | input_numeric_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 530 of file MLTableFunctions.hpp.
References CategoricalFeaturesBuilder< T >::getCatFeatureKeys(), CategoricalFeaturesBuilder< T >::getFeatures(), and linear_reg_fit_impl().
NEVER_INLINE HOST int32_t linear_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
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 571 of file MLTableFunctions.hpp.
References CategoricalFeaturesBuilder< T >::getCatFeatureKeys(), CategoricalFeaturesBuilder< T >::getFeatures(), and linear_reg_fit_impl().
NEVER_INLINE HOST int32_t linear_reg_fit_impl | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
const std::vector< std::vector< std::string >> & | cat_feature_keys, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 275 of file MLTableFunctions.hpp.
References MLModelMap::addModel(), DEFAULT, TableFunctions_Namespace::denull_data(), g_ml_models, get_ml_framework(), Column< TextEncodingDict >::getOrAddTransient(), TextEncodingNone::getString(), INVALID, MLPACK, ColumnList< T >::numCols(), ONEAPI, ONEDAL, pluck_ptrs(), TableFunctionManager::set_output_row_size(), and Column< T >::size().
Referenced by linear_reg_fit__cpu_template().
NEVER_INLINE HOST int32_t ml_reg_predict__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< K > & | input_ids, | ||
const ColumnList< T > & | input_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 1801 of file MLTableFunctions.hpp.
References check_model_params(), g_ml_models, MLModelMap::getModel(), ml_reg_predict_impl(), and ColumnList< T >::numCols().
Referenced by ml_reg_predict__cpu_template().
NEVER_INLINE HOST int32_t ml_reg_predict__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< K > & | input_ids, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const ColumnList< T > & | input_numeric_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 1837 of file MLTableFunctions.hpp.
References check_model_params(), g_ml_models, MLModelMap::getModel(), ml_reg_predict_impl(), ColumnList< T >::numCols(), and ColumnList< TextEncodingDict >::numCols().
NEVER_INLINE HOST int32_t ml_reg_predict__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< K > & | input_ids, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 1877 of file MLTableFunctions.hpp.
References check_model_params(), g_ml_models, MLModelMap::getModel(), ml_reg_predict_impl(), and ColumnList< TextEncodingDict >::numCols().
NEVER_INLINE HOST int32_t ml_reg_predict__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< TextEncodingDict > & | model_name, | ||
const Column< K > & | input_ids, | ||
const ColumnList< T > & | input_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 1915 of file MLTableFunctions.hpp.
References Column< TextEncodingDict >::getString(), ml_reg_predict__cpu_template(), and Column< TextEncodingDict >::size().
NEVER_INLINE HOST int32_t ml_reg_predict__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< TextEncodingDict > & | model_name, | ||
const Column< K > & | input_ids, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const ColumnList< T > & | input_numeric_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 1948 of file MLTableFunctions.hpp.
References Column< TextEncodingDict >::getString(), ml_reg_predict__cpu_template(), and Column< TextEncodingDict >::size().
NEVER_INLINE HOST int32_t ml_reg_predict__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< TextEncodingDict > & | model_name, | ||
const Column< K > & | input_ids, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 1983 of file MLTableFunctions.hpp.
References Column< TextEncodingDict >::getString(), ml_reg_predict__cpu_template(), and Column< TextEncodingDict >::size().
NEVER_INLINE HOST int32_t ml_reg_predict_impl | ( | TableFunctionManager & | mgr, |
const std::shared_ptr< AbstractMLModel > & | model, | ||
const Column< K > & | input_ids, | ||
const ColumnList< T > & | input_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 1664 of file MLTableFunctions.hpp.
References CHECK, DECISION_TREE_REG, DEFAULT, TableFunctions_Namespace::denull_data(), GBT_REG, get_ml_framework(), TextEncodingNone::getString(), INVALID, LINEAR_REG, MLPACK, ColumnList< T >::numCols(), ONEAPI, ONEDAL, pluck_ptrs(), Column< T >::ptr_, RANDOM_FOREST_REG, TableFunctionManager::set_output_row_size(), Column< T >::size(), heavydb.dtypes::T, and TableFunctions_Namespace::unmask_data().
Referenced by ml_reg_predict__cpu_template(), and r2_score_impl().
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().
NEVER_INLINE HOST int32_t pca_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const ColumnList< T > & | input_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 1585 of file MLTableFunctions.hpp.
References pca_fit_impl().
NEVER_INLINE HOST int32_t pca_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const ColumnList< T > & | input_numeric_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 1616 of file MLTableFunctions.hpp.
References CategoricalFeaturesBuilder< T >::getCatFeatureKeys(), CategoricalFeaturesBuilder< T >::getFeatures(), and pca_fit_impl().
NEVER_INLINE HOST int32_t pca_fit_impl | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const ColumnList< T > & | input_features, | ||
const std::vector< std::vector< std::string >> & | cat_feature_keys, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 1497 of file MLTableFunctions.hpp.
References MLModelMap::addModel(), DEFAULT, TableFunctions_Namespace::denull_data(), g_ml_models, get_ml_framework(), Column< TextEncodingDict >::getOrAddTransient(), TextEncodingNone::getString(), INVALID, ColumnList< T >::numCols(), ONEAPI, ONEDAL, pluck_ptrs(), TableFunctionManager::set_output_row_size(), ColumnList< T >::size(), and z_std_normalize_data_with_summary_stats().
Referenced by pca_fit__cpu_1(), and pca_fit__cpu_template().
std::vector<const T*> pluck_ptrs | ( | const std::vector< std::vector< T >> & | data, |
const int64_t | start_idx, | ||
const int64_t | end_idx | ||
) |
Definition at line 43 of file MLTableFunctions.hpp.
References CHECK_GE, CHECK_GT, and CHECK_LE.
Referenced by dbscan__cpu_template(), decision_tree_reg_impl(), gbt_reg_fit_impl(), kmeans__cpu_template(), linear_reg_fit_impl(), ml_reg_predict_impl(), pca_fit_impl(), and random_forest_reg_fit_impl().
std::vector<const T*> pluck_ptrs | ( | const std::vector< T * > & | data, |
const int64_t | start_idx, | ||
const int64_t | end_idx | ||
) |
NEVER_INLINE HOST int32_t r2_score__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
Column< double > & | output_r2 | ||
) |
Definition at line 2097 of file MLTableFunctions.hpp.
References check_model_params(), g_ml_models, MLModelMap::getModel(), ColumnList< T >::numCols(), and r2_score_impl().
Referenced by r2_score__cpu_template().
NEVER_INLINE HOST int32_t r2_score__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< TextEncodingDict > & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
Column< double > & | output_r2 | ||
) |
Definition at line 2123 of file MLTableFunctions.hpp.
References Column< TextEncodingDict >::getString(), r2_score__cpu_template(), and Column< TextEncodingDict >::size().
NEVER_INLINE HOST int32_t r2_score__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const ColumnList< T > & | input_numeric_features, | ||
Column< double > & | output_r2 | ||
) |
Definition at line 2146 of file MLTableFunctions.hpp.
References check_model_params(), g_ml_models, MLModelMap::getModel(), ColumnList< T >::numCols(), ColumnList< TextEncodingDict >::numCols(), and r2_score_impl().
NEVER_INLINE HOST int32_t r2_score__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
Column< double > & | output_r2 | ||
) |
Definition at line 2176 of file MLTableFunctions.hpp.
References check_model_params(), g_ml_models, MLModelMap::getModel(), ColumnList< TextEncodingDict >::numCols(), and r2_score_impl().
NEVER_INLINE HOST int32_t r2_score__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< TextEncodingDict > & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const ColumnList< T > & | input_numeric_features, | ||
Column< double > & | output_r2 | ||
) |
Definition at line 2204 of file MLTableFunctions.hpp.
References check_model_params(), g_ml_models, MLModelMap::getModel(), Column< TextEncodingDict >::getString(), ColumnList< T >::numCols(), ColumnList< TextEncodingDict >::numCols(), r2_score_impl(), and Column< TextEncodingDict >::size().
NEVER_INLINE HOST int32_t r2_score_impl | ( | TableFunctionManager & | mgr, |
const std::shared_ptr< AbstractMLModel > & | model, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
Column< double > & | output_r2 | ||
) |
Definition at line 2004 of file MLTableFunctions.hpp.
References TableFunctionManager::disable_output_allocations(), TableFunctionManager::enable_output_allocations(), get_column_mean(), max_inputs_per_thread, ml_reg_predict_impl(), threading_serial::parallel_for(), TableFunctionManager::set_output_row_size(), and Column< T >::size().
Referenced by r2_score__cpu_template().
NEVER_INLINE HOST int32_t random_forest_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
const int64_t | num_trees, | ||
const double | obs_per_tree_fraction, | ||
const int64_t | max_tree_depth, | ||
const int64_t | features_per_node, | ||
const double | impurity_threshold, | ||
const bool | bootstrap, | ||
const int64_t | min_obs_per_leaf_node, | ||
const int64_t | min_obs_per_split_node, | ||
const double | min_weight_fraction_in_leaf_node, | ||
const double | min_impurity_decrease_in_split_node, | ||
const int64_t | max_leaf_nodes, | ||
const bool | use_histogram, | ||
const TextEncodingNone & | var_importance_metric_str, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 1297 of file MLTableFunctions.hpp.
References random_forest_reg_fit_impl().
NEVER_INLINE HOST int32_t random_forest_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const ColumnList< T > & | input_numeric_features, | ||
const int64_t | num_trees, | ||
const double | obs_per_tree_fraction, | ||
const int64_t | max_tree_depth, | ||
const int64_t | features_per_node, | ||
const double | impurity_threshold, | ||
const bool | bootstrap, | ||
const int64_t | min_obs_per_leaf_node, | ||
const int64_t | min_obs_per_split_node, | ||
const double | min_weight_fraction_in_leaf_node, | ||
const double | min_impurity_decrease_in_split_node, | ||
const int64_t | max_leaf_nodes, | ||
const bool | use_histogram, | ||
const TextEncodingNone & | var_importance_metric_str, | ||
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 1368 of file MLTableFunctions.hpp.
References CategoricalFeaturesBuilder< T >::getCatFeatureKeys(), CategoricalFeaturesBuilder< T >::getFeatures(), and random_forest_reg_fit_impl().
NEVER_INLINE HOST int32_t random_forest_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< TextEncodingDict > & | input_cat_features, | ||
const int64_t | num_trees, | ||
const double | obs_per_tree_fraction, | ||
const int64_t | max_tree_depth, | ||
const int64_t | features_per_node, | ||
const double | impurity_threshold, | ||
const bool | bootstrap, | ||
const int64_t | min_obs_per_leaf_node, | ||
const int64_t | min_obs_per_split_node, | ||
const double | min_weight_fraction_in_leaf_node, | ||
const double | min_impurity_decrease_in_split_node, | ||
const int64_t | max_leaf_nodes, | ||
const bool | use_histogram, | ||
const TextEncodingNone & | var_importance_metric_str, | ||
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 1447 of file MLTableFunctions.hpp.
References CategoricalFeaturesBuilder< T >::getCatFeatureKeys(), CategoricalFeaturesBuilder< T >::getFeatures(), and random_forest_reg_fit_impl().
NEVER_INLINE HOST int32_t random_forest_reg_fit_impl | ( | TableFunctionManager & | mgr, |
const TextEncodingNone & | model_name, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
const std::vector< std::vector< std::string >> & | cat_feature_keys, | ||
const int64_t | num_trees, | ||
const double | obs_per_tree_fraction, | ||
const int64_t | max_tree_depth, | ||
const int64_t | features_per_node, | ||
const double | impurity_threshold, | ||
const bool | bootstrap, | ||
const int64_t | min_obs_per_leaf_node, | ||
const int64_t | min_obs_per_split_node, | ||
const double | min_weight_fraction_in_leaf_node, | ||
const double | min_impurity_decrease_in_split_node, | ||
const int64_t | max_leaf_nodes, | ||
const bool | use_histogram, | ||
const TextEncodingNone & | var_importance_metric_str, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
const TextEncodingNone & | model_metadata, | ||
Column< TextEncodingDict > & | output_model_name | ||
) |
Definition at line 1106 of file MLTableFunctions.hpp.
References DEFAULT, TableFunctions_Namespace::denull_data(), get_ml_framework(), get_var_importance_metric(), Column< TextEncodingDict >::getOrAddTransient(), TextEncodingNone::getString(), INVALID, MLPACK, ColumnList< T >::numCols(), ONEAPI, ONEDAL, pluck_ptrs(), TableFunctionManager::set_output_row_size(), Column< T >::size(), and heavydb.dtypes::T.
Referenced by random_forest_reg_fit__cpu_template().
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_.