OmniSciDB
a5dc49c757
|
#include <ParserNode.h>
Public Member Functions | |
CreateModelStmt (const rapidjson::Value &payload) | |
const std::string & | get_model_name () const |
const std::string & | get_select_query () const |
void | execute (const Catalog_Namespace::SessionInfo &session, bool read_only_mode) override |
void | train_model (const Catalog_Namespace::SessionInfo &session) |
Public Member Functions inherited from Parser::DDLStmt | |
void | setColumnDescriptor (ColumnDescriptor &cd, const ColumnDef *coldef) |
Public Member Functions inherited from Parser::Node | |
virtual | ~Node () |
Private Member Functions | |
bool | check_model_exists () |
void | parse_model_options () |
std::string | build_model_query (const std::shared_ptr< Catalog_Namespace::SessionInfo > session_ptr) |
Private Attributes | |
MLModelType | model_type_ |
std::string | model_name_ |
std::string | select_query_ |
bool | replace_ |
bool | if_not_exists_ |
std::list< std::unique_ptr < NameValueAssign > > | model_options_ |
std::ostringstream | options_oss_ |
size_t | num_options_ {0} |
double | data_split_train_fraction_ {1.0} |
double | data_split_eval_fraction_ {0.0} |
std::string | model_predicted_var_ |
std::vector< std::string > | model_feature_vars_ |
std::vector< int64_t > | feature_permutations_ |
Definition at line 1959 of file ParserNode.h.
Parser::CreateModelStmt::CreateModelStmt | ( | const rapidjson::Value & | payload | ) |
Definition at line 3455 of file ParserNode.cpp.
References CHECK, g_enable_ml_functions, get_ml_model_type_from_str(), if_not_exists_, json_bool(), json_str(), model_name_, model_options_, model_type_, Parser::anonymous_namespace{ParserNode.cpp}::parse_options(), replace_, and select_query_.
|
private |
Definition at line 3659 of file ParserNode.cpp.
References query_state::QueryState::create(), data_split_train_fraction_, feature_permutations_, Parser::LocalQueryConnector::getColumnDescriptors(), is_regression_model(), model_feature_vars_, model_predicted_var_, model_type_, Parser::LocalQueryConnector::query(), and select_query_.
Referenced by train_model().
|
private |
Definition at line 3545 of file ParserNode.cpp.
References g_ml_models, get_model_name(), if_not_exists_, MLModelMap::modelExists(), and replace_.
Referenced by train_model().
|
overridevirtual |
Implements Parser::DDLStmt.
Definition at line 3806 of file ParserNode.cpp.
References model_name_, and train_model().
Referenced by heavydb.cursor.Cursor::executemany().
|
inline |
Definition at line 1963 of file ParserNode.h.
References model_name_.
Referenced by check_model_exists(), and train_model().
|
inline |
|
private |
Definition at line 3563 of file ParserNode.cpp.
References data_split_eval_fraction_, data_split_train_fraction_, Parser::DoubleLiteral::get_doubleval(), Parser::IntLiteral::get_intval(), Parser::StringLiteral::get_stringval(), model_options_, num_options_, and options_oss_.
Referenced by train_model().
void Parser::CreateModelStmt::train_model | ( | const Catalog_Namespace::SessionInfo & | session | ) |
Definition at line 3747 of file ParserNode.cpp.
References build_model_query(), check_model_exists(), query_state::QueryState::create(), data_split_eval_fraction_, data_split_train_fraction_, shared::encode_base64(), feature_permutations_, get_ml_model_type_str(), get_model_name(), model_feature_vars_, model_predicted_var_, model_type_, num_options_, options_oss_, parse_model_options(), Parser::LocalQueryConnector::query(), select_query_, and Parser::write_model_params_to_json().
Referenced by execute().
|
private |
Definition at line 1979 of file ParserNode.h.
Referenced by parse_model_options(), and train_model().
|
private |
Definition at line 1978 of file ParserNode.h.
Referenced by build_model_query(), parse_model_options(), and train_model().
|
private |
Definition at line 1982 of file ParserNode.h.
Referenced by build_model_query(), and train_model().
|
private |
Definition at line 1974 of file ParserNode.h.
Referenced by check_model_exists(), and CreateModelStmt().
|
private |
Definition at line 1981 of file ParserNode.h.
Referenced by build_model_query(), and train_model().
|
private |
Definition at line 1971 of file ParserNode.h.
Referenced by CreateModelStmt(), execute(), and get_model_name().
|
private |
Definition at line 1975 of file ParserNode.h.
Referenced by CreateModelStmt(), and parse_model_options().
|
private |
Definition at line 1980 of file ParserNode.h.
Referenced by build_model_query(), and train_model().
|
private |
Definition at line 1970 of file ParserNode.h.
Referenced by build_model_query(), CreateModelStmt(), and train_model().
|
private |
Definition at line 1977 of file ParserNode.h.
Referenced by parse_model_options(), and train_model().
|
private |
Definition at line 1976 of file ParserNode.h.
Referenced by parse_model_options(), and train_model().
|
private |
Definition at line 1973 of file ParserNode.h.
Referenced by check_model_exists(), and CreateModelStmt().
|
private |
Definition at line 1972 of file ParserNode.h.
Referenced by build_model_query(), CreateModelStmt(), get_select_query(), and train_model().