Problem
Yandex Lavka is a 15-minute delivery service with more than 500 dark stores in 10 regions. Slots for next week's courier shifts must be ready by Saturday, and couriers choose from them. Too few couriers means missed demand; too many means paying for idle shifts. The team therefore needs hourly orders for every store, 14 days ahead.
Example from the article: hourly order forecasts for about 500 stores over 14 days, which cut the MAE of the previous production model by 25%.
Solution in brief
Start with weighted averages of past weeks as a baseline. Then train one CatBoost model for a 7-day horizon and run it twice, with features cut from about 360 to 14 by a selection funnel. Holiday effects come as per-holiday coefficients from a half-year model. The hourly forecast feeds a queueing model that outputs couriers per hour.
Questions this case answers
- How to forecast hourly demand for hundreds of locations two weeks ahead when a staffing plan must be published by a fixed weekly deadline
- How to make a short-window tree model handle rare calendar events that it cannot extrapolate to
- How to forecast hourly orders for hundreds of stores two weeks ahead to plan courier shifts?
- How to choose between one recursive model, a multi-day model and one model per forecast day?
Tools and methods
- CatBoost — gradient boosting with
store_idas a categorical feature, so 500+ stores need no per-store models - Weighted average of past weeks — baseline built with a SQL query
- Train / validation / out-of-time split — checks that metrics hold on future data
- Feature-selection funnel — cuts 300+ features to 14, ending with permutation importance
- Holiday coefficients from a half-year model — post-processing of daily totals and the intraday profile
- Erlang formula — turns hourly orders into courier counts
Google or a one-time email code. No password.
