0
$\begingroup$

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

$\endgroup$
0
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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