Intermittent Demand Forecasting System
Designed a production-oriented forecasting workflow for sparse product demand, combining sale/no-sale classification with magnitude regression and recursive multi-step inference.
Products
0k
Daily item-level series
History
0 yrs
Rolling temporal windows
Zero demand
0%
Sparse target records
Metrics
WAPE / RMSSE
Forecast quality
Problem
Daily product demand was dominated by zero-sales records, making direct regression unstable and difficult to validate without leakage.
Challenge
The core challenge was preserving temporal integrity while forecasting many product horizons recursively across rolling validation windows.
Architecture
How the pieces fit together.
Stage 1 predicts sale probability with binary classification. Stage 2 estimates conditional sales magnitude using LightGBM Tweedie regression. The recursive inference loop feeds prior predictions into lag and rolling features.
Architecture View
System structure and decision flow
Sale / No-sale
Binary classifier estimates sparse occurrence probability.
Magnitude
LightGBM Tweedie predicts conditional demand size.
Recursive Horizon
Predictions update lag and rolling features step by step.
Train window
Validation 1
Validation 2
Future horizon
Dataset / Inputs
- 20k products, three years of daily sales, strongly sparse product-level targets, and approximately 85% zero-demand rows.
Technical Decisions
- Split sale occurrence and magnitude into separate modeling stages.
- Use LightGBM Tweedie regression for non-negative sparse magnitude prediction.
- Treat recursive inference as production simulation during validation.
- Track zero-demand precision, recall, and F1 separately from aggregate forecast error.
Implementation Details
- Lag and rolling features are recomputed step by step during multi-horizon inference.
- Rolling validation windows preserve time order and prevent future leakage.
- Metric reporting includes WAPE, RMSSE, MAE, RMSE, and classification diagnostics.
- Feature computation is organized around product-level daily state updates.
Metrics / Results
- The system produced interpretable demand/no-demand decisions, tracked WAPE and RMSSE across rolling windows, and separated zero-demand precision/recall from magnitude error.
Lessons Learned
- Sparse demand forecasting is partly a classification problem.
- Validation code has to look like inference code when recursive features are used.
- A single metric cannot explain both no-sale decisions and magnitude quality.
Future Improvements
- Add probabilistic calibration for sale/no-sale thresholds.
- Benchmark hierarchical aggregation across product categories.
- Introduce drift monitoring for seasonal product behavior.