08 · Metrics
Partial AUROC
Caring about the top of the ranking without leaving ROC space.
AUROC averages over every threshold, giving each the same weight. That is the right thing to do when every threshold is a live possibility. Very often none of them are.
Most of the curve is unreachable
Richardson et al. give the motivating case. A drug discovery campaign screens
The pattern is everywhere once you look. A radiologist can review forty flagged scans a day. A fraud team can call three hundred customers. A hiring pipeline can interview twelve people. The capacity to act is fixed and small, and it fixes where on the curve you will stand, long before any model is trained.
Under that constraint, AUROC is answering a question with the wrong scope. Half its integral covers the region past
Integrate less of it
The repair is to stop integrating where you cannot go. Pick a ceiling
This is not yet comparable to anything. Its range depends on
The McClish correction rescales the interval so the familiar anchors come back.
Random scores now give roc_auc_score(y, s, max_fpr=0.1), which applies the correction (Richardson et al., 2024).
What survives the restriction
Everything section 07 established.
When one number hides two models
The restriction is not a cosmetic adjustment. Two models can have identical AUROC and behave completely differently in the only region you can reach.
What makes the example possible is that the curves cross, and that deserves a second look, because there is an objection lurking in it. Richardson et al. repeat Fawcett's warning that areas should not be compared when the underlying curves cross, since the summary is then averaging over a reversal (Richardson et al., 2024). We have just compared two areas.
The warning lands on the full-range number, not the restricted one. Across the whole curve,
The restricted comparison is safe for a specific reason. The crossing sits at
Which gives a rule worth carrying: compare areas only over a range on which one curve dominates the other throughout. Choosing that range by what you can afford to do will often hand you the condition for free, and when it does not, the curves crossing inside your own operating band is itself the finding.
Where has to come from
Richardson et al. recommend
Fortunately
For the antibody campaign,
It is worth naming what just happened, because the rest of the tutorial builds on it. A capacity constraint is a cost statement wearing work clothes. Saying that you can afford a hundred experiments is saying something about what a wasted experiment costs relative to a missed discovery. Partial AUROC lets that enter the metric, but only through a single blunt instrument, a hard ceiling, with everything below the ceiling still weighted equally.
Section 14 does the same job properly, with a cost ratio instead of a cutoff. Before that, section 09 takes the other route out of the ROC curve, and shows what happens when the preference for the top of the ranking is expressed implicitly instead.