Unit 9 of 11 · about 4 hours · implement

A split, metric and evaluation contract frozen before comparison

A fair comparison needs more than a seed. The contract prevents a changed population, metric or information policy from masquerading as model improvement.

You'll be able to

  • Freeze data identities, timing, split roles, metrics, model-selection budgets and exclusion rules before final comparison.
  • Encode entity, label-availability, split and metric invariants as tests with known failures.
  • Distinguish an exploratory sensitivity analysis from a replacement primary result.

Covers

Split, metric and evaluation contract fixed before comparison
1

Read

In this order, only the parts listed

0 of 3 done

  1. Lock the question and evaluatorApplied Science Investigation - Research Charter

    Architecture constraints; Milestone A, final bullet; Correctness requirements

  2. Document the design before resultsProject Design - Planning and Checklist

    Documenting the Design of your Study (page read 2026-10-19)

    Use the pre-result review principle. A locally frozen plan is not a formally peer-reviewed Registered Report. Skip the tool overview.

  3. Chronology follows the deployment questionRules of Machine Learning - Selected Rules

    Rule 33 (page read 2026-10-19)

    Keep forward evaluation. Do not copy the expectation that AUC stays close; concept shift can change ranking performance substantially.

2

Focus on

  • The Classical ML unit on split design and test isolation supplied the mechanics. Here freeze the claim those splits support: eligibility, immutable row and entity IDs, prediction issuance, label finalization, development versus selection versus final test, and the reserved extension evidence. A time gap must respect the actual outcome and update policy, not a convenient row count.
  • Worked support contract: forecast current-staffing shift means at 16:00; train only on finalized earlier labels; choose models on a later selection period; evaluate once on an untouched later period. If the claim is about this center's future, the same center may appear across periods. A new-center claim needs held-out centers instead. Freeze which dependence units may cross boundaries.
  • Primary MAE is over eligible shift means with equal shift weights. A caller-weighted alternative is a different aggregation, retained as a prespecified sensitivity with its changed interpretation. Lock missing-label handling, non-finite prediction policy, guardrails, comparison direction and uncertainty unit. A failed run cannot silently remove difficult shifts.
  • Tests should reject duplicate prediction keys, prohibited entity overlap, late training labels and altered metric denominators. Check arithmetic with a tiny independent oracle and demonstrate each seeded violation fails at the intended boundary. Passing tests establishes those invariants, not the absence of every leakage route.
Common mistakes · 3
  • Using the final test to choose between two otherwise reasonable contracts. That makes the contract itself a selected model component.
  • Treating the number of rows as the uncertainty unit. Shared queue, shift and temporal dependence survive a chronological split.
  • Replacing the primary metric after it disappoints. Report the original result; label the new analysis exploratory or test it on genuinely untouched evidence.
3

Try it yourself

Closed-book, before checking anything

From a blank file, implement a miniature evaluator for a declared future-shift contract. Use the previous unit's four-row held-out fixture as an independent MAE oracle. Add one duplicate prediction, one training label finalized after the fit cutoff, and one missing candidate prediction; each must raise an explicit validation failure. Declare whether repeated center IDs are allowed, then test that rule rather than banning all repeats by habit. Show that changing a threshold or split creates a new contract version while the original results remain readable.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Must all repeated center IDs be removed from a forward-in-time split?Answer

    No. Forecasting future shifts at known centers can legitimately reuse centers. The split must match that claim and handle dependence; generalization to unseen centers is a different claim.

  2. 2.Both methods report MAE, but each drops its own failed predictions. Is the comparison matched?Answer

    No. They may score different populations. Use the predeclared failure policy and common eligible IDs, retaining failures rather than hiding them.

  3. 3.Does one valid final evaluation forbid prespecified slice reporting?Answer

    No. A single locked analysis can include prespecified slices and sensitivities with appropriate uncertainty and multiplicity handling. It forbids using those outcomes to tune the claimed final comparison.

You're done when

The miniature evaluator matches the hand MAE oracle, rejects all three seeded failures and preserves the original result under a separately versioned contract change.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 7 more in the section
  • Project Design - Planning and ChecklistThe Turing Way · required

    Organizational companion, not the design method. Read Getting Started with Project Design (Setting Expectations Explicitly, Getting Ethical and Legal Approval), the Getting Started Checklist (Methodology, Stakeholders, Reporting & Evaluation) and Reproducibility Methods (Choose a License, Documenting the Design of your Study). Record stakeholders, approvals, licence and which work is exploratory or confirmatory. The Computational Reproducibility claim that notebooks need no installation describes a hosted option, not notebooks in general.

  • Rules of Machine Learning - Selected RulesGoogle for Developers · support

    Read Rules 1 to 5, 12 and 13, 25, 27 to 29, 31, 33, 38 and 39. Pair Rule 12 ("Don't overthink") with 13 and 39: the Alice example (better logistic loss and installs, daily active users down 5%) shows a better predictor rejected for a wrong objective. Rule 1's "50%" boost is rhetoric, and Rule 33's stable AUC expectation fails under concept shift.

  • Applied Science Investigation - Research CharterRoadmap-Final · support

    Use Overview, Milestone A, Core requirements and Correctness requirements as the charter template. Begin one investigation here and keep extending the same artifact through the final stage. Freeze the development, selection, test and reserved extension periods or groups before any final scoring, and run a sub-minute baseline ladder (a global mean, a stratified mean, one regularized model) as development evidence. A more flexible model losing to a simple heuristic is a result to keep.

Also in this section

  • REFORMS: Consensus-based Recommendations for Machine-learning-based ScienceKapoor et al., Science Advances · primary

    Read the article's scope section and Table 1, then the paired guidelines for items 1a to 1c (population of interest rather than the sample, why that population, why ML), 3b and 3g (sampling frame, representativeness), 5f (baselines), 6c (feature legitimacy at prediction time) and 8a to 8b (generalizability and where the claim does not hold). Write the charter against those items. REFORMS targets ML-based science and excludes pure methods research, so a methods question uses the applicable items, never a compliance claim. Its checklist and guidelines (https://reforms.cs.princeton.edu/) are a 2024 consensus, not a tested intervention. No source here derives an estimand, timeline and stop threshold for you: write one worked contract with a counterexample for each.

  • The Heilmeier CatechismDARPA · required

    Answer all eight questions for the proposed investigation, including current practice, novelty, who cares, risks, cost, duration and the midterm and final examinations. Use the answers to remove vague scope.

  • Machine Learning Problem FramingGoogle for Developers · support

    The core already assigned these exercises. Reread only Predictions vs. actions, Proxy labels and Define the success metrics as a critique: does the product decision deserve improvement, and can proxy movement justify the action? Two passages need correcting: in Regression, model family alone does not make classification "produce the correct behavior" (actions need calibrated probabilities and costs or a decision loss), and the "undefined gap" between failure and success is exactly where your charter must predeclare an action.

  • CS329S - Machine Learning Systems DesignStanford University · support

    Use the 2022 notes for Lecture 1 (Machine learning in research vs. in production, Stakeholders and their objectives, Requirements for ML Systems) and Lecture 6 (Model Offline Evaluation: Baselines, then the perturbation, invariance and directional expectation tests and Slice-based Evaluation). Model selection, development and training is one combined Lecture 5; read its tip 3 on unequal tuning effort. Excluding a sensitive attribute does not remove proxies, and the Lecture 6 subgroup table uses different denominators per model, a composition effect rather than a same-population ranking reversal.

  • UCI Bike Sharing DatasetUCI Machine Learning Repository (Fanaee-T and Gama) · support

    A licensed starter for the investigation: hourly and daily Capital Bikeshare rentals for 2011 and 2012 with calendar and weather fields (DOI 10.24432/C5W894; keep the attribution and record your transformations). The archive has 17,379 hourly rows although the page states 17,389. Missing hours are not zero demand, casual plus registered equals the target, same-hour weather is not a day-ahead forecast, and counts are realized rentals, not demand or the effect of rebalancing. Separate formulations it supports (next-day counts) from ones it cannot (a causal policy effect).

  • UCI Wine Quality DatasetUCI Machine Learning Repository (Cortez et al., 2009) · support

    An alternate investigation domain: 1,599 red and 4,898 white wines, 11 physicochemical inputs and an ordinal expert score (the median of at least three evaluations). There are no producer, lot, taster or date identifiers, so identical rows may be repeats or distinct samples; keep feature-identical rows in one split group and bound claims accordingly. Red-to-white transfer is a deliberately hard boundary, not evidence about all wine.

  • Research Methods Knowledge Base: Construct ValidityWilliam M. K. Trochim, hosted by Conjointly · required

    Construct Validity: opening definition, operationalizations of measures and treatments, convergent and discriminant evidence, and the final theoretical-pattern versus observed-pattern discussion (page read 2026-10-19). Use this to challenge a proxy, not as a checklist proving validity.