-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Metrics] R2Score #5241
[Metrics] R2Score #5241
Conversation
Hello @SkafteNicki! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-12-31 14:28:20 UTC |
NICE!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
Co-authored-by: Teddy Koker <teddy.koker@gmail.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Codecov Report
@@ Coverage Diff @@
## release/1.2-dev #5241 +/- ##
===============================================
Coverage 93% 93%
===============================================
Files 144 146 +2
Lines 10146 10211 +65
===============================================
+ Hits 9425 9486 +61
- Misses 721 725 +4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a suggestion, let me know :)
@rohitgr7 good point about adjusted r2 score. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! :)
adjusted: number of independent regressors for calculating adjusted r2 score. | ||
Default 0 (standard r2 score). | ||
multioutput: Defines aggregation in the case of multiple output scores. Can be one | ||
of the following strings (default is `'uniform_average'`.): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of the following strings (default is `'uniform_average'`.): | |
of the following strings (default is ``'uniform_average'``.): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should defaults be removed from the docs??
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
https://forums.pytorchlightning.ai/t/to-find-r2score-of-my-model/764 could you please, anyone help in this? r2 = r2score(logits, y) But it’s giving the following error ValueError: Expected both prediction and target to be 1D or 2D tensors, but recevied tensors with dimension torch.Size([50, 1, 32, 32]) |
What does this PR do?
Adds
R2Score
metric similar to sklearns (https://scikit-learn.org/stable/modules/generated/sklearn.metrics.r2_score.html)Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃