Skip to content

Implement RMSE (root-mean-square error) metric and scorer #12895

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

Closed
qinhanmin2014 opened this issue Dec 31, 2018 · 11 comments · Fixed by #13467
Closed

Implement RMSE (root-mean-square error) metric and scorer #12895

qinhanmin2014 opened this issue Dec 31, 2018 · 11 comments · Fixed by #13467
Labels
Easy Well-defined and straightforward way to resolve good first issue Easy with clear instructions to resolve help wanted

Comments

@qinhanmin2014
Copy link
Member

RMSE seems to be a popular metric but now one has to calculate it through np.sqrt(mean_squared_error(XXX, XXX)). Maybe we can add squared option to mean_squared_error and add a scorer neg_root_mean_squared_error.
Wiki page: https://en.wikipedia.org/wiki/Root-mean-square_deviation

@gykovacs
Copy link

gykovacs commented Jan 1, 2019

As the square root is a monotonic function on the positive domain, taking the square root would have no effect on any model selection. Could you please mention a use-case when it taking the root has some real advantage?

@qinhanmin2014
Copy link
Member Author

As the square root is a monotonic function on the positive domain, taking the square root would have no effect on any model selection

This is why we reject it previously I think (though I'm unable to find relevant discussions)
I'd argue that given the popularity of RMSE, it might be worthwhile to add several lines of (redundant) code for it (we only need <5 lines of code for the metric I think)
Sometimes users might want to report the RMSE of their model instead of MSE, because RMSE is more meaningful (i.e., it reflects the deviation between actual value and predicted value).

@urvang96
Copy link
Contributor

urvang96 commented Jan 2, 2019

Hi,
If there is a consensus on this I would like to give this a try.

@qinhanmin2014
Copy link
Member Author

If there is a consensus on this I would like to give this a try.

not yet, please wait or try another issue.

@qinhanmin2014
Copy link
Member Author

Hmm, I found #6457 (comment)

@qinhanmin2014 qinhanmin2014 added Easy Well-defined and straightforward way to resolve good first issue Easy with clear instructions to resolve help wanted labels Mar 12, 2019
@urvang96
Copy link
Contributor

I would like to work on this.

@alokranjan1234
Copy link

Is this still open? I would like to work on it.

@qinhanmin2014
Copy link
Member Author

you can start your work based on the stalled PR.

@amueller
Copy link
Member

amueller commented Aug 5, 2019

I think we should indeed add this.

@urvang96
Copy link
Contributor

urvang96 commented Aug 5, 2019

@amueller @qinhanmin2014 Could you please review the PR, which I created. PR #13467

@linehammer
Copy link

Mean Squared Error ( MSE ) is defined as Mean or Average of the square of the difference between actual and estimated values. This means that MSE is calculated by the square of the difference between the predicted and actual target variables, divided by the number of data points. It is always non–negative values and close to zero are better.

Root Mean Squared Error is the square root of Mean Squared Error (MSE). This is the same as Mean Squared Error (MSE) but the root of the value is considered while determining the accuracy of the model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy Well-defined and straightforward way to resolve good first issue Easy with clear instructions to resolve help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants