3
$\begingroup$

When reading of precision-recall curves and seeing examples, the last point of the curve is always a given value of precision for a recall of 1.

I'm a little confused about this. I have a detector and I am calculating the precision and recall curve. However, the last value of recall, in my case, is not 1. For it to be 1, that would mean that my detector finds as many True Positives as there exist Ground Truths.

For example, if my detector finds 7 TP and 17 FP and I have 15 Ground Truths, the final P-R values would be P = 7 / (7 + 17) and R = 7 / 15. This values, on the P-R curve, does not match with a Recall of 1.

Am I misunderstanding something? Thanks in advance.

$\endgroup$

1 Answer 1

1
$\begingroup$

You need to be varying some kind of threshold to draw precision-recall curve. At the very extreme point of that threshold (either lowest or highest), the recall should always be $1$ because you'll classify every example you see as Positive, and cover all the positives. This'll of course decrease precision however the end recall value is going to be $1$. In your case, it doesn't seem that you've reached up to the end of your threshold value.

$\endgroup$
3
  • $\begingroup$ My case is not for classification, but object detection. The P-R curve is calculated using a cummulative sum of both Precision and Recall, just like proposed here. $\endgroup$ Apr 8, 2020 at 13:37
  • $\begingroup$ it shouldn’t matter. You need to have a detection threshold and when you lower it to the min value you get recall = 1. $\endgroup$
    – gunes
    Apr 8, 2020 at 13:39
  • 1
    $\begingroup$ I have a threshold for Interception Over Union (IoU) equals to 0.5, but it is static. What varies is the Precision and Recall resultant from the sum of all TP and FP. In this link you can see an example of a P-R curve that does not end with Recall = 1. $\endgroup$ Apr 8, 2020 at 13:43

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.