Commit 651554ef authored by Manuel Günther's avatar Manuel Günther
Browse files

Re-fixed documentation issues with FAR/FRR; for consistency, now roc_for_far...

Re-fixed documentation issues with FAR/FRR; for consistency, now roc_for_far returns FRR and not CAR any more.
parent 96eecdf6
......@@ -402,8 +402,8 @@ blitz::Array<double,2> bob::measure::roc_for_far(const blitz::Array<double,1>& n
if ((double)neg_index / (double)n_neg > 1. - far_list(far_index)){
// copy the far value
retval(0,far_index) = far_list(far_index);
// calculate the CAR (i.e., 1.-frr) for the current FAR
retval(1,far_index) = 1. - (double)pos_index / (double)n_pos;
// calculate the FRR for the current FAR
retval(1,far_index) = (double)pos_index / (double)n_pos;
// go to the next FAR value
--far_index;
}
......@@ -411,7 +411,7 @@ blitz::Array<double,2> bob::measure::roc_for_far(const blitz::Array<double,1>& n
// do this, as long as there are elements in both lists left and not all FRR elements where calculated yet
} while (pos_it != positives_.end() && neg_it != negatives_.end() && far_index >= 0);
// check if all CAR values have been set
// check if all FRR values have been set
if (far_index >= 0){
// walk to the end of both lists; at least one of both lists should already have reached its limit.
pos_index += positives_.end() - pos_it;
......@@ -422,11 +422,11 @@ blitz::Array<double,2> bob::measure::roc_for_far(const blitz::Array<double,1>& n
retval(0,far_index) = far_list(far_index);
// check if the criterion is fulfilled (should be, as long as the lowest far is not below 0)
if ((double)neg_index / (double)n_neg > 1. - far_list(far_index)){
// calculate the CAR (i.e., 1.-FRR) for the current FAR
retval(1,far_index) = 1. - (double)pos_index / (double)n_pos;
// calculate the FRR for the current FAR
retval(1,far_index) = (double)pos_index / (double)n_pos;
} else {
// set CAR to zero (this should never happen, but might be due to numerical issues)
retval(1,far_index) = 0.;
// set FRR to 1 (this should never happen, but might be due to numerical issues)
retval(1,far_index) = 1.;
}
} while (far_index--);
}
......
......@@ -192,7 +192,7 @@ Calculates points of an Receiver Operating Characteristic (ROC).\n\
\n\
Calculates the ROC curve given a set of positive and negative scores\n\
and a desired number of points. Returns a two-dimensional array\n\
of doubles that express the X (FRR) and Y (FAR) coordinates in this\n\
of doubles that express the X (FAR) and Y (FRR) coordinates in this\n\
order. The points in which the ROC curve are calculated are\n\
distributed uniformily in the range [min(negatives, positives),\n\
max(negatives, positives)].\n\
......@@ -264,8 +264,8 @@ depending on the side the threshold falls.\n\
\n\
The output is in form of a tuple of two double-precision real\n\
numbers. The numbers range from 0 to 1. The first element of the pair\n\
is the false-accept ratio. The second element of the pair is the\n\
false-rejection ratio.\n\
is the false-accept ratio (FAR). The second element of the pair is the\n\
false-rejection ratio (FRR).\n\
\n\
It is possible that scores are inverted in the negative/positive\n\
sense. In some setups the designer may have setup the system so\n\
......@@ -830,7 +830,7 @@ PyDoc_STRVAR(s_rocch_doc,
\n\
Calculates the ROC Convex Hull curve given a set of positive and\n\
negative scores. Returns a two-dimensional array of doubles\n\
that express the X (FRR) and Y (FAR) coordinates in this order.\n\
that express the X (FAR) and Y (FRR) coordinates in this order.\n\
");
static PyObject* rocch(PyObject*, PyObject* args, PyObject* kwds) {
......@@ -912,7 +912,7 @@ PyDoc_STRVAR(s_roc_for_far_doc,
"roc_for_far(negatives, positives, far_list) -> numpy.ndarray\n\
\n\
Calculates the ROC curve given a set of positive and negative\n\
scores and the FAR values for which the CAR should be computed.\n\
scores and the FAR values for which the FRR should be computed.\n\
The resulting ROC curve holds a copy of the given FAR values (row\n\
0), and the corresponding FRR values (row 1).\n\
");
......
......@@ -18,6 +18,7 @@ develop = src/bob.extension
; options for bob.buildout extension
debug = true
verbose = true
newest = false
[sources]
bob.extension = git https://github.com/bioidiap/bob.extension
......
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