Unit 3 of 11 · about 3 hours · implement

Feature, label and action time on one timeline

A retrospective table can make an impossible prediction look easy. The charter needs a timeline that the evaluator can enforce, including publication delay and later revisions.

You'll be able to

  • Turn feature, prediction, action, outcome and label-availability times into executable eligibility checks.
  • Reject a historical join that uses information recorded or revised after prediction time.
  • Explain when delayed labels force a different update policy or a different question.

Covers

Feature time, label time and action time
1

Read

In this order, only the parts listed

0 of 3 done

  1. Legitimate inputs, not merely predictive onesREFORMS: Consensus-based Recommendations for Machine-learning-based Science

    Item 6c, Feature legitimacy (read 2026-10-19)

  2. Historical feature values can changeRules of Machine Learning - Selected Rules

    Rules 29 and 31: serving-time feature logging and changing joined tables (page read 2026-10-19)

  3. Recorded weather is not an issued forecastUCI Bike Sharing Dataset

    Additional Variable Information: dteday, hr, weathersit, temp, casual, registered and cnt

2

Focus on

  • The Classical ML unit on prediction context and timing established the cutoff. Here defend it under delay: in the support example, predict at 16:00, assign the agent at 17:00, serve arrivals from 18:00 to 22:00, follow them until exit, and obtain finalized labels next day at 09:00. This label delay is a teaching assumption, not a fact about a dataset.
  • A queue measurement at 15:55 published at 16:05 is unavailable at 16:00. A schedule for 18:00 published at 15:00 can be available. Keep event time and availability time separately; future event time alone does not make a planned input illegitimate.
  • A training label must be finalized before the fit cutoff. A feature used for a historical prediction must have the value available then, not the revised value visible now. Freeze time zone, boundary convention and revision policy.
  • For next-day rental prediction, calendar fields can be known in advance. Same-hour observed weather and the components casual and registered cannot stand in for forecasts and past counts. The archive supplies no publication timestamps, so document assumed calendar availability and avoid an operational replay claim.
Common mistakes · 3
  • Joining on event time alone. A backfilled feature may describe the past but still have been unavailable then.
  • Shifting by one row and calling it one hour. Absent hours break that equivalence; require a timestamp match or explicitly declare a last-observation policy.
  • Checking feature availability but updating from unfinalized labels. Online corrections also need the label-availability contract.
3

Try it yourself

Closed-book, before checking anything

Using only Python's standard library, build an eligibility function for ISO timestamps in one declared time zone. At the support cutoff 16:00, assert that the 15:55 measurement published at 16:05 fails and the 18:00 schedule published at 15:00 passes. Assert that yesterday's label finalized today at 09:00 can enter today's 15:00 fit but not today's 08:00 fit. Add a revision published at 16:10 and prove the historical join still returns the earlier value. Keep these as regression tests, not just a diagram.
4

Quiz yourself

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

0 got · 0 missed

  1. 1.Can a feature about 18:00 be legitimate at 16:00?Answer

    Yes, if it is a plan or forecast issued by 16:00 and that exact issued version is used. The realized 18:00 observation is different information.

  2. 2.Why is a shifted rental count not automatically a valid lag?Answer

    The prior row may not be the prior hour, and its label may not yet have arrived. Both timestamp distance and availability need checks.

  3. 3.A feature passes all availability checks. Is it necessarily legitimate under REFORMS 6c?Answer

    No. Availability is necessary for prediction, but a feature can still violate the task's intended scientific interpretation, privacy constraints or deployment policy.

You're done when

Your miniature historical join passes the four availability cases and ignores the late revision, and you can transfer the same checks to the library question.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 7 more in the 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.

  • 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.

  • 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).

Also in this 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.

  • 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.

  • 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.

  • 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.