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 ...@@ -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 some fast magic to compute the FRR values ;-)
do{ do{
// check whether the current positive value is less than the current negative one // 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 // increase the positive count
++pos_index; ++pos_index;
// go to the next positive value // go to the next positive value
......
...@@ -192,9 +192,9 @@ def test_plots(): ...@@ -192,9 +192,9 @@ def test_plots():
# This example will test the ROC for FAR plot calculation functionality. # This example will test the ROC for FAR plot calculation functionality.
far = [0.01, 0.1, 1] 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) 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[0], far)
assert numpy.array_equal(xy[1], ref) 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