in include/LightGBM/config.h [1177:1205]
inline std::string ParseMetricAlias(const std::string& type) {
if (type == std::string("regression") || type == std::string("regression_l2") || type == std::string("l2") || type == std::string("mean_squared_error") || type == std::string("mse")) {
return "l2";
} else if (type == std::string("l2_root") || type == std::string("root_mean_squared_error") || type == std::string("rmse")) {
return "rmse";
} else if (type == std::string("regression_l1") || type == std::string("l1") || type == std::string("mean_absolute_error") || type == std::string("mae")) {
return "l1";
} else if (type == std::string("binary_logloss") || type == std::string("binary")) {
return "binary_logloss";
} else if (type == std::string("ndcg") || type == std::string("lambdarank") || type == std::string("rank_xendcg")
|| type == std::string("xendcg") || type == std::string("xe_ndcg") || type == std::string("xe_ndcg_mart") || type == std::string("xendcg_mart")) {
return "ndcg";
} else if (type == std::string("map") || type == std::string("mean_average_precision")) {
return "map";
} else if (type == std::string("multi_logloss") || type == std::string("multiclass") || type == std::string("softmax") || type == std::string("multiclassova") || type == std::string("multiclass_ova") || type == std::string("ova") || type == std::string("ovr")) {
return "multi_logloss";
} else if (type == std::string("xentropy") || type == std::string("cross_entropy")) {
return "cross_entropy";
} else if (type == std::string("xentlambda") || type == std::string("cross_entropy_lambda")) {
return "cross_entropy_lambda";
} else if (type == std::string("kldiv") || type == std::string("kullback_leibler")) {
return "kullback_leibler";
} else if (type == std::string("mean_absolute_percentage_error") || type == std::string("mape")) {
return "mape";
} else if (type == std::string("none") || type == std::string("null") || type == std::string("custom") || type == std::string("na")) {
return "custom";
}
return type;
}