Skip to content
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 Average Precision and R2 to the metrics #8085

Closed
KumoLiu opened this issue Sep 16, 2024 Discussed in #8081 · 0 comments · Fixed by #8089 · May be fixed by #8093
Closed

Add Average Precision and R2 to the metrics #8085

KumoLiu opened this issue Sep 16, 2024 Discussed in #8081 · 0 comments · Fixed by #8089 · May be fixed by #8093

Comments

@KumoLiu
Copy link
Contributor

KumoLiu commented Sep 16, 2024

Discussed in #8081

Originally posted by thibaultdvx September 13, 2024
Hi,
I would like to suggest to add the Average Precision in the classification metrics. I think that the implementation would be very similar to ROC AUC, so it wouldn't be a big deal to integrate it.
I would be happy to make a PR to do so.

I also feel that an important regression metric is missing: R2 score. Is there any reason why?
Once again, I would be happy to help to implement it!

WDYT?

Can-Zhao pushed a commit to Can-Zhao/MONAI that referenced this issue Mar 10, 2025
Fixes Project-MONAI#8085.

### Description

Average Precision is very similar to ROCAUC, so I was very much inspired
by the ROCAUC implementation.
More precisely, I created:
- `AveragePrecisionMetric` and `compute_average_precision` in
`monai.metrics`,
- a handler called `AveragePrecision` in `monai.handlers`,
- three unittest modules: `test_compute_average_precision.py`,
`test_handler_average_precision.py` and
`test_handler_average_precision_dist.py`.

I also modified the docs to mention Average Precision.

### 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).
- [x] 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`.
- [x] In-line docstrings updated.
- [x] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: thibaultdvx <thibault.devarax@icm-institute.org>
Signed-off-by: Thibault de Varax <154365476+thibaultdvx@users.noreply.github.com>
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Signed-off-by: Can-Zhao <volcanofly@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant