New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MAPE as evaluation metric #10708
Comments
@amueller, I'd like to work on this. |
sure, go for it. |
@amueller, all sklearn metrics have an output in the |
@mohamed-ali not all. MSE doesn't, for example (though I guess all with a fixed range do). I think we should multiply by 100 given that it's part of the definition, even though it's slightly different from other metrics. |
@amueller okay great. Thanks for the quick reply :) |
@amueller regarding the scorer, based on the deprecation message in the following example, I assume there should be a
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/metrics/scorer.py#L472-L497 Is my assumption correct? |
if we call it mean_absolute_proportion_error we don't need the 100x
|
yes, for the scorer, it should be neg_, but for the metric it should not.
Andy proposed the scorer name neg_mape above
|
because the score is negated to follow the convention that greater is
better. but users complained when we negated it without signifying so in
the name
|
@jnothman thank you! |
Co-authored-by: mohamed-ali <m.ali.jamaoui@gmail.com> Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> Co-authored-by: Joel Nothman <joel.nothman@gmail.com> Co-authored-by: Roman Yurchak <rth.yurchak@pm.me>
(scikit-learn#15007) Co-authored-by: mohamed-ali <m.ali.jamaoui@gmail.com> Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> Co-authored-by: Joel Nothman <joel.nothman@gmail.com> Co-authored-by: Roman Yurchak <rth.yurchak@pm.me>
(scikit-learn#15007) Co-authored-by: mohamed-ali <m.ali.jamaoui@gmail.com> Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> Co-authored-by: Joel Nothman <joel.nothman@gmail.com> Co-authored-by: Roman Yurchak <rth.yurchak@pm.me>
Also see #6605.
https://en.wikipedia.org/wiki/Mean_absolute_percentage_error
probably need a neg_mape scorer, too.
The text was updated successfully, but these errors were encountered: