A bakery chain's stores differ by district — offices empty at weekends, residential streets fill up, campuses go quiet in the vacation — and every category has its own rhythm. Baking what sold on the same day last week is the usual rule. One model trained across all stores and categories forecasts the next two weeks with an interval, and turns the forecast into a production quantity that weighs a lost sale against a wasted loaf.
The first request was a Christmas-cake forecast. The unit stores actually decide on is how much of each category to bake each day, all year, in every store — so the problem was re-scoped to mid-level categories covering most revenue, across 300+ stores.
District type, weekday, holidays, promotions, weather and season are learned once across all stores; each store-category brings its own recent level. In the project, Temporal Fusion Transformer, PatchTST and DeepAR were compared on sales, payment, discount and commercial-district data; here a regularized log-linear model plays that role.
An unsold loaf costs its ingredients; a lost sale costs its margin. Producing at the quantile where those balance — the newsvendor rule — turns the forecast interval into a number of trays, and it is that number, not the forecast, that moves revenue.