Problem
SberMarket (now Kuper), a grocery delivery service, needs enough pickers and couriers in every store at every hour, so it forecasts orders per store with hourly accuracy. Demand grows fast: in 2021 the company delivered 4 times more orders than in 2020. Old order counts describe a different regime, and the author's team found that demand data goes stale in about 3 months. Stores also differ in scale, from hundreds of orders a day in hypermarkets to single digits in small shops, so one pooled training set is heterogeneous.
Example from the article: a model for 1 June 2022 takes the 21 days up to 31 May and forecasts the 14 days from 1 June.
Solution in brief
Forecast the rate of change instead of order counts: inside each training pair, divide all demand values by the median demand of the last 7 days. Train a separate LightGBM model for each of the 14 forecast days on these relative values, multiply back by the median, then spread each day's total over hours with an averaged hourly profile. City and country forecasts use their own datasets and models.
Questions this case answers
- How to forecast hourly demand across many units of very different scale when a fast-growing trend makes older history unrepresentative
- How to forecast demand at an aggregate level (region, country) without summing unit-level forecasts
- How to forecast hourly order volumes per store when demand grows so fast that data older than three months is stale?
- How to train one demand model on stores of very different sizes?
Tools and methods
- Median normalization — puts all stores and periods on one scale around 1.
- LightGBM (LGBMRegressor) — one gradient boosting model per forecast day.
- Hourly profiles — average order shares by hour over three weeks, per day type.
- MAPE — mean absolute percentage error, the quality metric.
Google or a one-time email code. No password.
