Question 9 of 9 Advanced Practical
Design a validation scheme for an ML model intended to predict outcomes in future calendar periods.
Short answer
For prediction about future patients, validation must respect calendar time, information availability and group boundaries. Random cross-validation alone does not reproduce that deployment task.
Why
Clinical practice, disease prevalence, coding and measurements drift over time. Training with future patients or future-updated features lets the model access information that would not exist at deployment. Repeated visits create additional group dependence.
How to work it through
- Specify an index date and prediction horizon.
- Train on an earlier period, tune on a later but still pre-test period, and reserve the most recent untouched period for evaluation.
- Keep patient episodes appropriately grouped, implement feature cutoffs and gap or purge periods where outcome windows overlap.
- Simulate periodic retraining prospectively, monitor calibration and report performance by calendar cohort and site.
An example
A 2024 to 2025 model predicting 30-day hospitalization is evaluated on 2026 admissions. Lab values collected 48 hours after the index visit are excluded even if they exist in the retrospective database.
Where the answer stops holding
Severe seasonal effects may require multiple rolling-origin windows. Patient reappearance is sometimes legitimate for an established-patient use case, but the target population and leakage control must be explicit.
A strong answer covers
- For prediction about future patients, validation must respect calendar time, information availability and group boundaries
- Random cross-validation alone does not reproduce that deployment task
- Specify an index date and prediction horizon
Common mistakes
- Shuffling future cases into training
- Choosing the best temporal split after inspecting results
- Using retrospectively corrected codes unavailable in real time
The interviewer might ask next
How would you validate a model that will be recalibrated monthly?