Commit 5398a4a7 authored by Manuel Günther's avatar Manuel Günther

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

parent c970a982
Pipeline #13220 passed with stages
in 9 minutes and 17 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