Skip to content

Commit

Permalink
add more regression metrics (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Nov 27, 2020
1 parent c2d8ccd commit 12ba315
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion supervised/base_automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ def _validate_eval_metric(self):
Use 'logloss'"
)

elif self._get_ml_task() == REGRESSION and self.eval_metric != "rmse":
elif self._get_ml_task() == REGRESSION and self.eval_metric not in ["rmse", "mse", "mae"]:
raise ValueError(
f"Metric {self.eval_metric} is not allowed in ML task: {self._get_ml_task()}. \
Use 'rmse'"
Expand Down
3 changes: 1 addition & 2 deletions supervised/utils/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ def __init__(self, params):
raise MetricException("Metric name not defined")
self.minimize_direction = self.name in [
"logloss",
"auc", # negative auc
"rmse",
"mae",
"ce",
"mse",
"auc",
]
if self.name == "logloss":
self.metric = logloss
Expand Down

0 comments on commit 12ba315

Please sign in to comment.