Evaluation, Uncertainty, Shift & Decisions
A score becomes actionable only after selection, uncertainty, calibration, slices, costs and plausible shifts have been checked under a frozen protocol.
Section 5 of 5 · 10 units · about 34 hours
By the end you can Produce a frozen comparison with paired uncertainty, calibration or a reason it does not apply, threshold policy, slices, one shift study and a decision that survives a small movement in the best score.
Units
- Holdout, cross-validation and resampling by the right unit3h
- Regression error and confusion-matrix metrics3h
- ROC AUC, average precision, log loss and Brier score3h
- Calibration curves and Platt or isotonic recalibration4h
- Cost-sensitive thresholds, imbalance and prevalence change4h
- Paired bootstrap, permutation tests and multiplicity4h
- Learning curves, error taxonomies and slices3h
- Permutation importance and partial dependence3h
- Covariate, label and concept shift, drift and label delay4h
- Ablations, negative controls, threats to validity and decision memos3h
Build it
Mini project · about 12 to 16 hours
Frozen comparison and decision dossier
Take two or three candidate models through a frozen protocol on one structured dataset: raw predictions, paired uncertainty, calibration, a threshold policy, slices, one controlled shift study, and a narrow decision that survives a small movement in the best score.
- 1Freeze the protocol before any fitting: snapshot, a group- or time-aware split, nested or clean selection, one search budget per family, and a sealed test split.
- 2Store per-row predictions for every candidate, and hand-check the central metrics on small cases before trusting library calls.
- 3Compare candidates with a paired bootstrap interval and a paired permutation test on the same rows. Report the effect size, the comparison count and a Holm or Benjamini-Hochberg adjustment.
- 4Calibrate on held-out data with a reliability table, ECE checked against Deep-ML 260, and a Platt or isotonic map from a disjoint split. Set the cost-derived threshold beside
TunedThresholdClassifierCVon validation, with a reject option reported as risk at coverage. - 5Slice errors along deployment axes with support counts and intervals, and read a learning curve to decide whether more data would help.
- 6Run one controlled shift: move one variable or the class prior yourself, detect it with a domain classifier or prior re-estimation, and test the response against the ground truth you set.
- 7Write the decision memo, then perturb it: replace the best score with the lower end of its paired interval or rerun with another seed, and state whether the decision holds and which tripwire would reverse it. Report the test-set numbers once.
What you hand in
- The frozen protocol and the raw prediction store.
- The comparison report: paired uncertainty with multiplicity, calibration, threshold policy, slices and the learning curve.
- The shift study with its known ground truth.
- The decision memo with its tripwire, the perturbation result and the retained negative results.
How to check it
- Deep-ML 260 Expected Calibration Error
Public tests. Pass it before you trust your own ECE function.
- Self-grade with the rubric below
How it's graded
Frozen protocol
Pass: No choice touches the test split, and every reported number traces to stored raw predictions.
Great: A seeded test-tuned threshold is caught by an audit before the report is written.
Paired uncertainty
Pass: A paired interval and a paired permutation test are reported on the same rows, with an effect size.
Great: The comparison count and the multiplicity adjustment are reported, and an unpaired interval shows what pairing bought.
Calibration and threshold
Pass: A held-out reliability table and a cost-derived threshold are reported.
Great: Recalibration fitted on disjoint data improves held-out log loss or Brier, and the reject option is reported as a (risk, coverage) pair.
Slices and shift
Pass: Slices carry support counts and intervals, and one controlled shift is detected.
Great: The shift response is checked against the simulation's ground truth, and its failure region is stated.
Decision
Pass: The memo states the decision, evidence, uncertainty and threats.
Great: The decision survives the perturbation and names the tripwire that would reverse it.
Resources
- scikit-learn - model selection and evaluation routescikit-learn
Follow Cross-validation, Hyperparameter tuning, Decision threshold tuning, Metrics and scoring, Probability calibration, Validation curves, Permutation importance and Common Pitfalls. Retain raw predictions and independently hand-check central metrics.
- ISLP - resampling and multiple testingJames, Witten, Hastie, Tibshirani and Taylor
Use Chapter 5 and the relevant selection-history parts of Chapter 13 with their Python labs. Connect resampling to uncertainty and multiplicity without repeating the full statistics stage.
- D2L - Environment and Distribution ShiftD2L authors
Read 4.7, then construct one controlled covariate, label and concept shift. Record what changes, which signal detects it and what response the evidence supports.
- Deep-ML candidate - evaluation problemsDeep-ML
After the platform admission check, use at most one of 18 K-Fold CV, 260 Expected Calibration Error, 276 ROC, 277 AUC or 840 Stratified K-Fold. Hand-checked local metrics remain the evidence.
- Classical ML Scientific InvestigationRoadmap-Final
Use Core requirements, architecture constraints, Milestones A-F and failure injection as the standard for end-to-end evidence. The full project remains a later capstone route.
- SciPy - Resampling and Monte Carlo methods tutorialsSciPy developers
Work the notebooks linked from this page: Tutorial 3 (The Bootstrap) with
scipy.stats.bootstrap, includingpaired=True, and Tutorial 2b (Paired-Sample Permutation Tests) withpermutation_testandpermutation_type='samples'. Keep one resampling index stream across compared models. - El-Yaniv and Wiener - On the Foundations of Noise-free Selective ClassificationJMLR
Read the Abstract and Section 2 (Preliminary Definitions: Definitions 1 and 2 for coverage and selective risk) for the risk-coverage tradeoff. Stop before the noise-free learning bounds.