Uncertainty and models
ROC curve
Shows sensitivity against false-positive rate as a binary classifier threshold changes.
- Plot
- Model evaluation
- Threshold comparison
What it answers
How does sensitivity trade off against false alarms?
- Shape
- True-positive versus false-positive curve
- What it shows
- Discrimination and threshold trade-offs.
Example
The question
How well does our churn model separate leavers from stayers?
Churn model: true positive rate against false positive rate (ROC curve)
Illustrative data. It belongs to no company.
When to use it
Use it when
Evaluating binary ranking scores on suitable held-out data.
Avoid it when
Only one class present or treating ROC as calibration.
How to read it
Read false-positive rate on X and true-positive rate on Y across thresholds.
Note
Both classes and continuous scores are needed unless rates are precomputed.
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; sweep thresholds to compute true/false-positive rates.
- Units
- TPR=TP/(TP+FN); FPR=FP/(FP+TN). Both outcome classes need nonzero support.
Worked example
Scores positives 0.9,0.65; negatives 0.55,0.2. Atthreshold 0.6, TPR=1 and FPR=0 in this toy sample; do not generalise fromfour cases.
| CaseID | Actual | Score |
|---|---|---|
| A | 1 | 0.90 |
| B | 0 | 0.20 |
| C | 1 | 0.65 |
| D | 0 | 0.55 |
