[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!! |
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 |
gianscarpe
left a comment
There was a problem hiding this comment.
Just a suggestion, let me know :)
|
@rohitgr7 good point about adjusted r2 score. |
| 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.
| of the following strings (default is `'uniform_average'`.): | |
| of the following strings (default is ``'uniform_average'``.): |
There was a problem hiding this comment.
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
R2Scoremetric 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 🙃