kboyd / Roc

Everything ROC and Precision-Recall curves.
BSD 2-Clause "Simplified" License
23 stars 7 forks source link

All same labels results in NaNs in output #31

Open afbarnard opened 8 years ago

afbarnard commented 8 years ago

If all the labels are the same (all negative or all positive), then there are NaNs in both the ROC and PR points. Also, both the ROC and PR areas are NaN. While this makes sense, this is not helpful or useful output. Therefore this case needs some sort of special handling. I would prefer some sort of value, so as to not impede experimental workflows, probably with a warning, but quitting with an error would also be an option.