Add Average Precision to metrics
Fixes #8085.
Description
Average Precision is very similar to ROCAUC, so I was very much inspired by the ROCAUC implementation. More precisely, I created:
AveragePrecisionMetricandcompute_average_precisioninmonai.metrics,- a handler called
AveragePrecisioninmonai.handlers, - three unittest modules:
test_compute_average_precision.py,test_handler_average_precision.pyandtest_handler_average_precision_dist.py.
I also modified the docs to mention Average Precision.
Types of changes
- [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 htmlcommand in thedocs/folder.
/build
hi @KumoLiu, could you please have a look at this PR?
Hi @thibaultdvx we've updated our tests with a directory structure, if you could please look over comments and update where your test files are we can come back to this PR. Thanks!
Hi @ericspod @KumoLiu, sorry for the absence. I got work and forgot this PR. I'll get right on it!
@ericspod @KumoLiu ready for review. I don't understand the failing in CI tests, but I'm not sure it is related to my PR.
Hi @thibaultdvx I'm going to merge recent changes into your branch and see if that sorts the test issues, I don't think it was related to PR either.
I think this is good to go now, @KumoLiu if you could please trigger blossom, thanks.
/build
Hi @thibaultdvx, please help fix the format issue: https://github.com/Project-MONAI/MONAI/actions/runs/13406057032/job/37446075381?pr=8089 Then I will help trigger the test again, thanks!
/build