-
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 Average Precision to metrics #8089
base: dev
Are you sure you want to change the base?
Add Average Precision to metrics #8089
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]>
for more information, see https://pre-commit.ci
/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, overall looks good to me.
`Average Precision` | ||
-------------------------- |
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.
`Average Precision` | |
-------------------------- | |
`Average Precision` | |
------------------- |
|
||
class AveragePrecisionMetric(CumulativeIterationMetric): | ||
""" | ||
Computes Average Precision (AP). Referring to: `sklearn.metrics.average_precision_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.
For the lazy it would be nice to explain here what this metric is and its intended application area.
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.
Looks good to me too, I had a minor comment and it would be nice to combine the last 2 test files, it would be better to have fewer test files if possible.
Fixes #8085.
Description
Average Precision is very similar to ROCAUC, so I was very much inspired by the ROCAUC implementation.
More precisely, I created:
AveragePrecisionMetric
andcompute_average_precision
inmonai.metrics
,AveragePrecision
inmonai.handlers
,test_compute_average_precision.py
,test_handler_average_precision.py
andtest_handler_average_precision_dist.py
.I also modified the docs to mention Average Precision.
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.