Commit 5c508b9a authored by André Anjos's avatar André Anjos 💬

Merge branch 'far_1_fix' into 'master'

Fixed issue with FAR and FRR values being exactly 1 or 0, respectively

See merge request !41
parents c970a982 5398a4a7
Pipeline #13221 passed with stages
in 7 minutes and 42 seconds
......@@ -125,7 +125,7 @@ double bob::measure::farThreshold(const blitz::Array<double, 1> &negatives,
// compute position of the threshold
double crr = 1. - far_value; // (Correct Rejection Rate; = 1 - FAR)
double crr_index = crr * neg.extent(0) - 1.;
double crr_index = std::max(crr * neg.extent(0) - 1., 0.);
// compute the index above the current CRR value
int index = (int)std::ceil(crr_index);
......@@ -163,7 +163,7 @@ double bob::measure::frrThreshold(const blitz::Array<double, 1> &,
sort(positives, pos, is_sorted);
// compute position of the threshold
double frr_index = frr_value * pos.extent(0) - 1.;
double frr_index = std::max(frr_value * pos.extent(0) - 1., 0.);
// compute the index below the current FAR value
int index = (int)std::ceil(frr_index);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment