# Precision-Recall representation - last value of the curve

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.

## 1 Answer

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.

• 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. Apr 8, 2020 at 13:37
• it shouldn’t matter. You need to have a detection threshold and when you lower it to the min value you get recall = 1. Apr 8, 2020 at 13:39
• 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. Apr 8, 2020 at 13:43