Time Series Cross-Validation with Walk-Forward Splits
Random train/test splits assume examples are exchangeable. Time-series data violates that assumption because the future occurs after the past, and production models normally predict observations that were not available during training.
Walk-forward validation preserves that chronology.
Why random splitting is misleading Suppose you want to predict next week’s demand from historical sales. A random split can place March observations in the test set while April observations appear in training.
Even if features do not explicitly contain future values, the evaluation now uses a model fitted on a future regime. Seasonality, pricing, inventory, customer behavior, and economic conditions can all make the score more optimistic than deployment reality.