Problem
The Magnit retail chain must predict how many units of a given product a given store will sell in a promo period with known parameters. Many products are new or have no earlier promo. Sales are sparse: in low-turnover categories without discounts, up to 80% of daily rows are zero. Demand reacts to discounts non-linearly, and prices and discounts often fall outside the history.
Example from the article: when someone asks why a forecast came to 2000 units, analysts must unwind the ensemble, find the models that contribute most to the error and check each one.
Solution in brief
The team runs four model families with different training granularity: a multiplicative statistical model, a linear model, gradient boosting and a neural network. An ensemble combines them. The multiplicative model forecasts items with no history, boosting gives a conservative forecast bounded by history, and linear models extrapolate to unseen prices and discounts.
Questions this case answers
- How to produce a per-item, per-location demand forecast for every incoming record, including items with no history, while keeping errors explainable
- How to combine several forecasting models of different architecture into one production forecast that stays accurate under price and assortment shifts
- How to forecast sales of a product in a store for a promo when many products and stores have no history
- How to keep a forecast explainable for the business when thousands of models run behind it
Tools and methods
- Multiplicative forecasting model — base sales times multipliers, with a hierarchical fallback
- Linear models — about a million models on subgroups
- Gradient boosting — per geography, product group and store type
- Ensembling — rules, business requirements or an add-on model combine forecasts
- Prophet — seasonality coefficients
- Spark, Hadoop, Hive, Airflow — distributed training, scheduling
Google or a one-time email code. No password.
