-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Change exception to warning in AUC metric #3672
Description
Is your feature request related to a problem? Please describe.
Currently, when the input data is all 0 or all 1, AUC will raise an error:
https://github.com/Project-MONAI/MONAI/blob/dev/monai/metrics/rocauc.py#L69
@SachidanandAlle , @madil90 , and our internal QAs all encountered this error in classification tasks before, especially when verifying the pipeline with very few samples. For example, it's easy to trigger the exception in chest X-ray classification task as the task has 15 classes, easy to get all 0 or all 1 samples for a class.
I would like to change the exception to warning and skip the AUC computation for this case, or add a flag to control whether a warning or exception?
@ericspod @wyli @rijobro Do you guys have any other concerns?
Thanks in advance.