Resolve "FAR and FRR thresholds are computed even when there is no data support"
Closes #27 (closed)
Also changes behavior of far_threshold and frr_threshold where the returned threshold guarantees the at most the requested far/frr value.
Merge request reports
Activity
assigned to @amohammadi
@amohammadi Is this what you wanted?
@mguenther I pushed some test cases here that were mentioned in #27 (closed) and I think these tests should pass. Let me know what do you think.
assigned to @mguenther
added 1 commit
- 5142b646 - Correct the threshold calculation implementation in far_threshold and…
@mguenther I have fixed the issue and also changed the behavior. You can still get the NaNs as discussed in #27 (closed) but I have changed the implementation that when a requested FAR or FRR is not possible, it will return a threshold that will give you a lower value in FAR and FRR than that. I asked around today and everybody seemed to believe that a lower or equal value FAR, FRR should be guaranteed. @andre.anjos @tiago.pereira @sbhatta were the people that I asked.
Basically I ended up moving through scores and calculating the FAR/FRR until it was bigger than requested. It might be slower but is much easier to understand and less error prone.
@amohammadi Thanks for this suggestion. I wanted to avoid running through the scores, but I am now trying almost four hours to get the index correct in all corner cases...
added 2 commits
I think you forgot the corner case introduced by yourself, i.e., when the scores are actually separable -- in which case you might want to return the smallest positive for
far_threshold
and the largest negative forfrr_threshold
, or maybe a value slightly higher (smaller) than the highest (lowest) value. Just using FAR=0 and FRR=0 as corner cases is not enough.I will push an adaptation of your test case that will fail here.
- Resolved by Amir MOHAMMADI