Problem
Yandex Lavka delivers groceries from dark stores, closed warehouses where only pickers work. Couriers choose shifts for the whole next week on the weekend, so the slots must be ready by Saturday. The slots come from an order forecast for more than 500 stores, 24 hours a day, up to 14 days ahead (about 10 thousand predictions). An under-forecast loses orders. An over-forecast leaves paid couriers idle.
Example from the article: a forecast of 1 order against 100 real ones loses demand, and a forecast of 100 against 1 sends 100 couriers to idle.
Solution in brief
One CatBoost model with the store ID as a categorical feature predicts hourly orders for 7 days and runs twice to cover 14 days. A funnel cuts about 360 generated features to 14, and a coefficient table from a mid-term model corrects holidays in post-processing. The forecast feeds a queueing model that turns orders into courier slots. In production since June 2023, MAE is 25% lower than the previous model.
Questions this case answers
- How to forecast hourly demand for thousands of locations up to two weeks ahead when the forecast must be ready before a fixed planning deadline
- How to choose between one multi-horizon model and several per-day models when errors accumulate over the horizon and per-day outputs must agree
- How to forecast hourly order volume per store two weeks ahead to plan courier shifts
- How to choose between one model and many models for a multi-day forecast horizon
Tools and methods
- CatBoost — one model for all stores, store ID as a categorical feature
- Baselines — last-week profile, mean and weighted mean over N weeks, daily total split by an hourly distribution
- Feature funnel — missing values, pairwise correlation, linear dependence, permutation importance
- Holiday coefficient — taken from the mid-term model, applied after prediction
- Erlang formula — turns the order forecast into courier counts
Google or a one-time email code. No password.
