Problem
Walmart forecasts volumes (cases, pallets, trailers, labor) across a supply chain with thousands of time series. Series differ in seasonality, replenishment speed and route through the network. New buildings, shifting supplier alignments, weather, Covid 19 and promotions keep changing the patterns. Over-forecasting and under-forecasting both cost money, and business teams also want to know what drives each forecast. A model chosen once on history stops fitting when a series changes, and hand-tuning each series does not scale.
Example from the article: a project with 400 weekly series, one per supply chain node, forecast two weeks ahead, with Prophet as the baseline.
Solution in brief
Run a backtest inside the production forecast job. For every series, try a grid of models, hyperparameters and feature sets on a recent validation window, pick the combination with the lowest chosen error, retrain it up to the refresh date and forecast. Pre-processing, feature building and explainability live in the same framework, and Dask parallelises the work.
Questions this case answers
- How to choose a forecasting model per series for thousands of heterogeneous time series when one model does not fit all and series patterns drift over time
- How to pick the best forecasting model automatically for thousands of time series with different patterns?
- How to keep the chosen model valid when a series changes its pattern in production?
- How to run model selection with feature engineering without leaking future data into the backtest?
Tools and methods
- Rolling backtest selection — picks model, hyperparameters and regressors per series on the latest validation weeks
- Prophet, Holt-Winters, TBATS, naive, linear, tree models, stacking — the candidate pool
- Outlier and drift treatment — IQR on decomposition residuals, PELT change points with CROPS
- Lag, same-week and rolling-mean features — inputs for non-time-series models
- SHAP — local and global explanations of the chosen model
- Dask — parallel forecasting of many series
Google or a one-time email code. No password.