scikit-learn-contrib / imbalanced-learn

A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning
https://imbalanced-learn.org
MIT License
6.77k stars 1.28k forks source link

[ENH] Add macro-averaged mean squared error #846

Open warnbergg opened 3 years ago

warnbergg commented 3 years ago

Describe the solution you'd like

In #780 the macro-averaged mean absolute error was proposed as a metric to the library. Using the same rationale as for that feature, I suggest that also the macro-averaged mean squared error (MAMSE) is added to the library. That way we penalize errors that are further from the ground truth more harshly.

Is this feature something that could be of interest to the greater public?

hayesall commented 3 years ago

Maybe add a squared=True parameter?

That should keep things fairly close with how it's handled elsewhere, e.g. sklearn.metrics.mean_squared_error

warnbergg commented 3 years ago

@hayesall Yes, that is maybe a better option. I'll create a PR for that!