Uncertainty and models
Precision-recall curve
Shows precision against recall across binary decision thresholds.
- Plot
- Model evaluation
- Threshold comparison
What it answers
How does precision change as recall increases?
- Shape
- Precision versus recall curve
- What it shows
- Retrieval trade-offs and false-positive burden.
Example
The question
How many flagged customers really churn as we flag more of them?
Churn model: precision against recall (PR curve)
Illustrative data. It belongs to no company.
When to use it
Use it when
Binary evaluation where positive-class retrieval matters.
Avoid it when
Comparing populations with different prevalence without context.
How to read it
Read recall on X and precision on Y while thresholds change.
Note
Precision depends on prevalence.
The data you need
- Layout
- Long table
- Fields
- CaseID: text; Actual: 0/1; Score: number
- One row is
- One case with its true binary outcome and prediction score. What is the grain?
- Rules
- Define the positive class and score direction. Use held-out predictions for evaluation. Calibration needs probabilities in [0,1].
- Optional
- Weight. ROC/PR alternatives: precomputed Threshold,TP,FP,TN,FN with complete threshold coverage.
- Preparation
- Use held-out binary outcomes and scores; calculate precision and recall at the selected thresholds.
- Units
- Precision=TP/(TP+FP); recall=TP/(TP+FN). State zero-denominator handling and positive-class prevalence.
Worked example
Positives 0.9,0.65; negatives 0.55,0.2. Threshold 0.6 givesprecision 1, recall 1; threshold 0.5 givesprecision 2/3, recall 1.
| CaseID | Actual | Score |
|---|---|---|
| A | 1 | 0.90 |
| B | 0 | 0.20 |
| C | 1 | 0.65 |
| D | 0 | 0.55 |
