Skip to content

Commit

Permalink
Merge pull request #6465 from mode80/master
Browse files Browse the repository at this point in the history
Make MAPE available to Test & Score
  • Loading branch information
janezd committed Jun 16, 2023
2 parents 828a535 + b5a2039 commit b457638
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Orange/evaluation/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from Orange.misc.wrapper_meta import WrapperMeta

__all__ = ["CA", "Precision", "Recall", "F1", "PrecisionRecallFSupport", "AUC",
"MSE", "RMSE", "MAE", "R2", "LogLoss", "MatthewsCorrCoefficient"]
"MSE", "RMSE", "MAE", "MAPE", "R2", "LogLoss", "MatthewsCorrCoefficient"]


class ScoreMetaType(WrapperMeta):
Expand Down Expand Up @@ -399,6 +399,11 @@ class MAE(RegressionScore):
long_name = "Mean absolute error"
priority = 40

class MAPE(RegressionScore):
__wraps__ = skl_metrics.mean_absolute_percentage_error
name = "MAPE"
long_name = "Mean absolute percentage error"
priority = 45

# pylint: disable=invalid-name
class R2(RegressionScore):
Expand Down

0 comments on commit b457638

Please sign in to comment.