Skip to content
Snippets Groups Projects
Commit 5398a4a7 authored by Manuel Günther's avatar Manuel Günther
Browse files

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

parent c970a982
Branches
Tags
1 merge request!41Fixed issue with FAR and FRR values being exactly 1 or 0, respectively
Pipeline #
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment