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
Infinite case value causes error #30
Comments
Thanks for the report. It is related with issue #25 indeed, but this is a really tricky one. If you define the criteria for the positivity of an observation as x >= t (this is the case in pROC with The opposite is true if you define positivity as x > t (strict) and negative x <= t, you can setup curves that never reach 100% sensitivity. In both cases you have a curve which is not fully defined. Curves not hitting 0 or 100% will create all sort of issues down the line (with AUC etc) and pROC should not create any. This is definitely not handled properly by the DeLong Theta which is agnostic to the actual threshold and only cares about the ordering. It is also not handled properly by algorithm 2, which actually works like the DeLong Theta making this bit run:
Also note how the curve is not actually complete if the infinity is in the controls (or I guess in the cases with direction = ">").
I am not sure how to handle this correctly yet. Most likely I'll have to return |
~~This is one curve that can never reach 100% specificity:~~~~
Edit: The above is just plain wrong and shows how confusing thresholding infinities with infinities is. |
One more note to self: it is very likely that only algorithms 1 and 3 can deal with infinite values properly, so it will be important to remember to:
|
The more I look at this issue, the more I think +-Inf should be just flat-out rejected. It is simply too confusing, even I need to think very hard to get which conditions work and which ones don't. I fear that accepting some Inf but not others will be just far too confusing. Refusing to threshold infinities with infinity in all cases makes sense, and is much easier to understand. This leaves the question: what should
Feedback from users is welcome. |
Thanks for handling this issue so quickly! My personal preference would be option 2: stop with an error. A well-written error message will hopefully help users quickly isolate and understand the problem. |
Option 2 has my preference too, the previous commit implements it. |
After lots of thinking and hesitation, I don't think throwing errors is a good idea, and it is likely to break things. Instead I think returning NaN makes more sense, as thresholding infinities with infinities is not defined mathematically, rather than missing. I need to perform more tests, especially of reverse dependencies before submitting to CRAN. |
I pushed pROC v1.13.0 to CRAN yesterday and it the submission just went through. It should be available shortly. |
pROC generates an error whenever the list of case values contains Inf. I suspect this is related to issue #25 . I am using the most recent GitHub version of pROC (as of May 11).
To Reproduce
Steps to reproduce the behavior:
pROC-inf-bug-test.txt
The text was updated successfully, but these errors were encountered: