I have a binary classifier that I evaluate using cross validation. The classifier gives me a score for each observation and for each of the test sets I use a varying threshold to compute precision and recall values. Similar as to described in Threshold in precision/recall curve.

I can plot the precision recall values for each set as a curve by connection the entries/points with lines, but how would I average the different precision recall curves into one?

My first idea would be to use a for-loop to go through all recall values and try to (sub)sample precision values, but that seems to be very un-elegant.

How do you do it the right way?enter image description here


1 Answer 1


I just ended up using an 'engineering' approach and used an optimized function for interpolation.

In my case: http://docs.scipy.org/doc/numpy/reference/generated/numpy.interp.html


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.