-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add R2 score to metrics #8093
base: dev
Are you sure you want to change the base?
Add R2 score to metrics #8093
Conversation
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
/build |
hi @KumoLiu, could you please have a look at this PR? |
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.
Thanks for the PR, leave few comments inline.
|
||
class R2Score(IgniteMetricHandler): | ||
""" | ||
Computes :math:`R^{2}` score accumulating predictions and the ground-truth during an epoch and applying `compute_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.
As elsewhere it would help to explain where this is used and what it would be for. The math is explained in the function which is fine so no need here, just a high level idea.
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.
Hi @ericspod, tell me if the new version looks good to you!
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.
I mean more to explain what the R2 means, what it would be used with (eg. compare classifications vs. segmentations), what it's value is vs other metrics. I would put this in the docstring for R2Metric
however. Other than that this is fine here.
Fixes Project-MONAI#8186. ### Description A few sentences describing the changes proposed in this pull request. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: YunLiu <[email protected]> Co-authored-by: Ben Murray <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: thibaultdvx <[email protected]>
Signed-off-by: thibaultdvx <[email protected]>
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.
I think this is good to go.
/build |
Fixes #8085.
Description
I created:
R2Metric
andcompute_r2_score
inmonai.metrics
,R2Score
inmonai.handlers
,test_compute_r2_score.py
,test_handler_r2_score.py
andtest_handler_r2_score_dist.py
.I also modified the docs to mention R2 score.
Note:
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.