Problem
A bank must schedule staff in hundreds of branches. Monthly averages do not help: two branches with the same monthly volume can have different morning peaks, working hours and evening shares. Too few staff means queues and missed service targets. Too many means paid idle hours, uneven shifts and overtime. Planning needs a forecast per branch, date and hour, made once a month for the next 45 days.
Example from the article: inference runs on the 20th of each month, covers the rest of that month and the next one, hours 8:00 to 21:00.
Solution in brief
The team starts from a two-stage CatBoost baseline (daily volume first, then the hourly split). It then feeds hourly Prophet forecasts and seasonal components into a Temporal Fusion Transformer (TFT). TFT is trained per branch-hour series with a quantile-based scaler and the median (L1) loss. On the hourly validation slice MAE falls from 1.951 to 1.478.
Questions this case answers
- How to forecast demand per location and hour for the whole next month when seasonalities of different periods interact and tree models on hand-made calendar features stop improving
- How to feed a downstream resource optimizer with a forecast that is explainable and available weeks in advance
- How to forecast customer visits per branch and hour for staff scheduling?
- How to combine Prophet components with a Temporal Fusion Transformer on many hourly series?
Tools and methods
- CatBoost — baseline: a daily model, then an hourly model that takes the daily forecast as a feature.
- Prophet — per-branch hourly forecast and seasonal components that become known-future features.
- Temporal Fusion Transformer — multi-horizon model over branch-hour series with static, known-future and observed inputs.
- Optuna — hyperparameter search for CatBoost and Prophet.
Google or a one-time email code. No password.