Implement RMSE (root-mean-square error) metric and scorer#13467
Implement RMSE (root-mean-square error) metric and scorer#13467rth merged 13 commits intoscikit-learn:masterfrom
Conversation
|
As per my understanding, I have added the scorer. Let me know if I missed something. |
|
there're still some pep8 errors, please refer to https://circleci.com/gh/scikit-learn/scikit-learn/52068 |
|
Please add the new scorer to https://scikit-learn.org/dev/modules/model_evaluation.html#common-cases-predefined-values |
|
I think we need more tests, e.g., test_regression_multioutput_array and test_regression_metrics_at_limits. |
|
May I try continuing work on this? |
|
@xinyuliu12 Actually I am waiting for a review on this. Also, I am not sure about the doc failures in the commit so if you want you can help with that. @qinhanmin2014 Could you please review and let me know if any changes required. |
|
@urvang96 Merge with master should fix the doc tests |
qinhanmin2014
left a comment
There was a problem hiding this comment.
Please add an entry to the change log at doc/whats_new/v*.rst. Like the other entries there, please reference this pull request with :pr: and credit yourself (and other contributors if applicable) with :user:.
|
@qinhanmin2014 Added the changes in whats_new. Thank you. |
sklearn/metrics/regression.py
Outdated
|
|
||
| return np.average(output_errors, weights=multioutput) | ||
| mse = np.average(output_errors, weights=multioutput) | ||
| if not squared: |
There was a problem hiding this comment.
Nit:
return mse if squared else np.sqrt(mse)
Reference Issues/PRs
Fixes #12895
Implement RMSE (root-mean-square error) metric and scorer
What does this implement/fix? Explain your changes.
Added a boolean parameter in MSE implementation to return RMSE value, if set to true. Also added an RMSE scorer.
Any other comments?
One test.