Commit fe73cee0 authored by Manuel Günther's avatar Manuel Günther

Changed the ROC curve to implement what is required by 'The Handbook of Face Recognition'

parent c055afa9
Pipeline #5508 passed with stages
in 3 minutes and 7 seconds
......@@ -385,7 +385,7 @@ blitz::Array<double,2> bob::measure::roc_for_far(const blitz::Array<double,1>& n
// do some fast magic to compute the FRR values ;-)
do{
// check whether the current positive value is less than the current negative one
if (*pos_it <= *neg_it){
if (*pos_it < *neg_it){
// increase the positive count
++pos_index;
// go to the next positive value
......@@ -399,8 +399,8 @@ blitz::Array<double,2> bob::measure::roc_for_far(const blitz::Array<double,1>& n
// check, if we have reached a new FAR limit,
// i.e. if the relative number of negative similarities is greater than 1-FAR (which is the CRR)
if (((double)neg_index / (double)n_neg > 1. - far_list(far_index)) &&
if (((double)neg_index / (double)n_neg > 1. - far_list(far_index)) &&
!(bob::core::isClose ((double)neg_index / (double)n_neg, 1. - far_list(far_index), 1e-9, 1e-9))) {
// copy the far value
retval(0,far_index) = far_list(far_index);
......
......@@ -192,9 +192,9 @@ def test_plots():
# This example will test the ROC for FAR plot calculation functionality.
far = [0.01, 0.1, 1]
ref = [0.48, 0.22, 0]
ref = [0.42, 0.12, 0]
xy = roc_for_far(negatives, positives, far)
# uncomment the next line to save a reference value
assert numpy.array_equal(xy[0], far)
assert numpy.array_equal(xy[1], ref)
......
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