All lessons in Machine Learning Engineering: Reliable Predictive Models
Bootstrap Uncertainty and Paired Comparisons
Estimate uncertainty at the independent sampling unit and avoid false significance.
30 minutes · Members lesson · preview
What you will learn
- Build a paired bootstrap interval for the difference in validation log loss between two models starting from per-row losses.
- Choose a resampling unit (parcel, dispatch day, or route) that matches the independent sampling unit and estimate how clustering shrinks the effective sample size.
- Explain why fold standard deviations, repeated seeded runs, and resampling after selection do not provide independent evidence that one model is really better.
Suppose the carrier's validation set holds 2,000 parcels, the logistic model scores a mean log loss of 0.412 and the forest scores 0.409. The forest wins by 0.003. Is that a property of the models, or of which 2,000 parcels happened to land in the validation split? A single number cannot answer that. This lesson shows how to attach an honest range to a score difference by resampling, and how to avoid the two classic ways of fooling yourself: resampling the wrong unit, and reusing data that already influenced a choice.