33 return "DECISION_TREE_REG";
39 return "RANDOM_FOREST_REG";
45 CHECK(
false) <<
"Unknown model type.";
53 const auto upper_model_type_str =
to_upper(model_type_str);
54 if (upper_model_type_str ==
"LINEAR_REG") {
56 }
else if (upper_model_type_str ==
"DECISION_TREE_REG") {
58 }
else if (upper_model_type_str ==
"GBT_REG") {
60 }
else if (upper_model_type_str ==
"RANDOM_FOREST_REG") {
62 }
else if (upper_model_type_str ==
"PCA") {
65 throw std::invalid_argument(
"Unknown model type: " + upper_model_type_str);
std::string get_ml_model_type_str(const MLModelType model_type)
bool is_regression_model(const MLModelType model_type)
MLModelType get_ml_model_type_from_str(const std::string &model_type_str)