I'm looking at a precision-recall curve for a binary classification task. My precision-recall curve intersects the y-axis (precision) at 60% and the x-axis at 15%. So I get 15% precision at 100% recall.

1) Doesn't this mean that my true label occurs 15% of the time?

2) My curve (using sklearn's precision_recall_curve) goes through the point representing 50% precision and 40% recall. But doesn't that imply that there are 20% positive labels? So isn't that an invalid combination of precision and recall values?



1 Answer 1


1) By "crossing the x-axis", it seems like you're actually meaning where the plot ends when recall=100%. In that case, yes.

(Crossing x-axis means when y=0. But y = precision in this case and precision can't be smaller than proportion of positive samples.)

2) Why does that imply there are 20% positive labels?

For example, if we have the following confusion matrix values (for some threshold): $$\text{TP}=6,\quad \text{FN}=9,\quad \text{FP}=6,\quad\text{TN}=79,$$ then we get precision=50% and recall=40%, and the proportion of positives 15%.

You can get those confusion matrix numbers by doing simple algebra with the following: $$\frac{\text{TP}+\text{FN}}{\text{TP}+\text{FN}+\text{FP}+\text{TN}} = 0,$$ $$\text{precision}=\frac{\text{TP}}{\text{TP}+\text{FP}} = 0.5,$$ $$\text{recall}=\frac{\text{TP}}{\text{TP}+\text{FN}} = 0.4.$$ I used the smallest integer that would satisfy these equations.

I suggest this post to learn more about interpreting Precision-Recall curves!


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.