179 questions
No questions match those filters.
How do you split time-series data for validation?
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansChronologically, never randomly. A random split lets the model effectively train on the future and predict the past, which produces excellent validation numbers and an immediate, confusing failure the moment it hits production, where the future genuinely isn’t available yet.
The right approach is rolling-origin (or expanding-window) validation — train on a chronological window, validate on the period immediately after it, then roll the window forward and repeat. And it’s not just about the split: any engineered feature has to be computed only from information that would actually have been available at that prediction’s timestamp, or the same leakage sneaks back in through feature engineering even with a correct split.