Add MAPE metric (#6119)

This commit is contained in:
Philip Hyunsu Cho
2020-09-14 18:45:27 -07:00
committed by GitHub
parent 47350f6acb
commit 33577ef5d3
9 changed files with 41 additions and 3 deletions

View File

@@ -56,8 +56,8 @@ private[spark] trait LearningTaskParams extends Params {
/**
* evaluation metrics for validation data, a default metric will be assigned according to
* objective(rmse for regression, and error for classification, mean average precision for
* ranking). options: rmse, rmsle, mae, logloss, error, merror, mlogloss, auc, aucpr, ndcg, map,
* gamma-deviance
* ranking). options: rmse, rmsle, mae, mape, logloss, error, merror, mlogloss, auc, aucpr, ndcg,
* map, gamma-deviance
*/
final val evalMetric = new Param[String](this, "evalMetric", "evaluation metrics for " +
"validation data, a default metric will be assigned according to objective " +
@@ -121,6 +121,6 @@ private[spark] object LearningTaskParams {
val evalMetricsToMaximize = HashSet("auc", "aucpr", "ndcg", "map")
val evalMetricsToMinimize = HashSet("rmse", "rmsle", "mae", "logloss", "error", "merror",
val evalMetricsToMinimize = HashSet("rmse", "rmsle", "mae", "mape", "logloss", "error", "merror",
"mlogloss", "gamma-deviance")
}