OmniSciDB
c1a53651b2
|
#include "QueryEngine/TableFunctions/SystemFunctions/os/ML/MLTableFunctionsCommon.h"
#include "QueryEngine/TableFunctions/SystemFunctions/os/Shared/NullRowsRemoval.h"
#include "QueryEngine/heavydbTypes.h"
Go to the source code of this file.
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) |
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 | 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, Column< K > &output_ids, Column< int32_t > &output_clusters) |
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 int32_t num_clusters, const int32_t num_iterations, 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 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, Column< K > &output_ids, Column< int32_t > &output_clusters) |
template<typename T > | |
NEVER_INLINE HOST int32_t | linear_reg_fit__cpu_template (TableFunctionManager &mgr, const Column< T > &input_labels, const ColumnList< T > &input_features, const TextEncodingNone &preferred_ml_framework_str, Column< int32_t > &output_coef_idxs, Column< T > &output_coefs) |
template<typename T > | |
NEVER_INLINE HOST int32_t | linear_reg_fit__cpu_template (TableFunctionManager &mgr, const Column< T > &input_labels, const ColumnList< T > &input_features, Column< int32_t > &output_coef_idxs, Column< T > &output_coefs) |
template<typename T > | |
std::vector< T > | sort_coefs (const Column< int32_t > &coef_idxs, const Column< T > &coefs) |
template<typename T , typename K > | |
NEVER_INLINE HOST int32_t | linear_reg_predict__cpu_template (TableFunctionManager &mgr, const Column< K > &input_ids, const ColumnList< T > &input_features, const Column< int32_t > &coef_idxs, const Column< T > &coefs, const TextEncodingNone &preferred_ml_framework_str, Column< K > &output_ids, Column< T > &output_predictions) |
template<typename T , typename K > | |
NEVER_INLINE HOST int32_t | linear_reg_predict__cpu_template (TableFunctionManager &mgr, const Column< K > &input_ids, const ColumnList< T > &input_features, const Column< int32_t > &coef_idxs, const Column< T > &coefs, Column< K > &output_ids, Column< T > &output_predictions) |
template<typename T > | |
Column< T > | create_wrapper_col (std::vector< T > &col_vec) |
template<typename T , typename K > | |
NEVER_INLINE HOST int32_t | linear_reg_fit_predict__cpu_template (TableFunctionManager &mgr, const Column< K > &input_ids, const Column< T > &input_labels, 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 | linear_reg_fit_predict__cpu_template (TableFunctionManager &mgr, const Column< K > &input_ids, const Column< T > &input_labels, const ColumnList< T > &input_features, Column< K > &output_ids, Column< T > &output_predictions) |
Column<T> create_wrapper_col | ( | std::vector< T > & | col_vec | ) |
Definition at line 595 of file MLTableFunctions.hpp.
Referenced by linear_reg_fit_predict__cpu_template().
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 298 of file MLTableFunctions.hpp.
References DEFAULT, TableFunctions_Namespace::denull_data(), get_ml_framework(), TextEncodingNone::getString(), INVALID, MLPACK, ONEDAL, pluck_ptrs(), Column< T >::ptr_, TableFunctionManager::set_output_row_size(), Column< T >::size(), TableFunctions_Namespace::unmask_data(), and z_std_normalize_data().
Referenced by dbscan__cpu_template().
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, | ||
Column< K > & | output_ids, | ||
Column< int32_t > & | output_clusters | ||
) |
Definition at line 374 of file MLTableFunctions.hpp.
References dbscan__cpu_template().
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 139 of file MLTableFunctions.hpp.
References DEFAULT, TableFunctions_Namespace::denull_data(), get_kmeans_init_type(), get_ml_framework(), TextEncodingNone::getString(), INVALID, MLPACK, ONEDAL, pluck_ptrs(), Column< T >::ptr_, TableFunctionManager::set_output_row_size(), Column< T >::size(), TableFunctions_Namespace::unmask_data(), and z_std_normalize_data().
Referenced by kmeans__cpu_template().
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, | ||
Column< K > & | output_ids, | ||
Column< int32_t > & | output_clusters | ||
) |
Definition at line 231 of file MLTableFunctions.hpp.
References kmeans__cpu_template().
NEVER_INLINE HOST int32_t kmeans__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< K > & | input_ids, | ||
const ColumnList< T > & | input_features, | ||
const int32_t | num_clusters, | ||
const int32_t | num_iterations, | ||
Column< K > & | output_ids, | ||
Column< int32_t > & | output_clusters | ||
) |
Definition at line 264 of file MLTableFunctions.hpp.
References kmeans__cpu_template().
NEVER_INLINE HOST int32_t linear_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< int32_t > & | output_coef_idxs, | ||
Column< T > & | output_coefs | ||
) |
Definition at line 403 of file MLTableFunctions.hpp.
References DEFAULT, TableFunctions_Namespace::denull_data(), get_ml_framework(), TextEncodingNone::getString(), INVALID, MLPACK, ColumnList< T >::numCols(), ONEDAL, pluck_ptrs(), Column< T >::ptr_, and TableFunctionManager::set_output_row_size().
Referenced by linear_reg_fit__cpu_template(), and linear_reg_fit_predict__cpu_template().
NEVER_INLINE HOST int32_t linear_reg_fit__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
Column< int32_t > & | output_coef_idxs, | ||
Column< T > & | output_coefs | ||
) |
Definition at line 464 of file MLTableFunctions.hpp.
References linear_reg_fit__cpu_template().
NEVER_INLINE HOST int32_t linear_reg_fit_predict__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< K > & | input_ids, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 612 of file MLTableFunctions.hpp.
References create_wrapper_col(), TableFunctionManager::disable_output_allocations(), TableFunctionManager::enable_output_allocations(), linear_reg_fit__cpu_template(), linear_reg_predict__cpu_template(), and ColumnList< T >::numCols().
Referenced by linear_reg_fit_predict__cpu_template().
NEVER_INLINE HOST int32_t linear_reg_fit_predict__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< K > & | input_ids, | ||
const Column< T > & | input_labels, | ||
const ColumnList< T > & | input_features, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 656 of file MLTableFunctions.hpp.
References linear_reg_fit_predict__cpu_template().
NEVER_INLINE HOST int32_t linear_reg_predict__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< K > & | input_ids, | ||
const ColumnList< T > & | input_features, | ||
const Column< int32_t > & | coef_idxs, | ||
const Column< T > & | coefs, | ||
const TextEncodingNone & | preferred_ml_framework_str, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 501 of file MLTableFunctions.hpp.
References DEFAULT, TableFunctions_Namespace::denull_data(), get_ml_framework(), TextEncodingNone::getString(), INVALID, MLPACK, ColumnList< T >::numCols(), ONEDAL, pluck_ptrs(), Column< T >::ptr_, TableFunctionManager::set_output_row_size(), Column< T >::size(), sort_coefs(), heavydb.dtypes::T, and TableFunctions_Namespace::unmask_data().
Referenced by linear_reg_fit_predict__cpu_template(), and linear_reg_predict__cpu_template().
NEVER_INLINE HOST int32_t linear_reg_predict__cpu_template | ( | TableFunctionManager & | mgr, |
const Column< K > & | input_ids, | ||
const ColumnList< T > & | input_features, | ||
const Column< int32_t > & | coef_idxs, | ||
const Column< T > & | coefs, | ||
Column< K > & | output_ids, | ||
Column< T > & | output_predictions | ||
) |
Definition at line 576 of file MLTableFunctions.hpp.
References linear_reg_predict__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 36 of file MLTableFunctions.hpp.
References CHECK_GE, CHECK_GT, and CHECK_LE.
Referenced by dbscan__cpu_template(), kmeans__cpu_template(), linear_reg_fit__cpu_template(), and linear_reg_predict__cpu_template().
std::vector<const T*> pluck_ptrs | ( | const std::vector< T * > & | data, |
const int64_t | start_idx, | ||
const int64_t | end_idx | ||
) |
std::vector<T> sort_coefs | ( | const Column< int32_t > & | coef_idxs, |
const Column< T > & | coefs | ||
) |
Definition at line 479 of file MLTableFunctions.hpp.
References Column< T >::size().
Referenced by linear_reg_predict__cpu_template().
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 71 of file MLTableFunctions.hpp.
References StringDictionaryProxy::getOrAddTransientBulk(), TableFunctionManager::set_output_row_size(), and Column< TextEncodingDict >::string_dict_proxy_.