Your sales history
One row per product and day: date, product, baked, sold, optional rain, temp_c, holiday. Nothing is uploaded.
What a roll is worth
Breadcast does not just predict the average. It picks the quantity that balances a lost sale against a wasted item (the newsvendor rule). Enter prices and costs per item.
| Product | Price (€) | Cost to bake (€) | Value if unsold (€)e.g. sold cheap next day | Target service level |
|---|
Would it have helped? Backtest on the last 8 weeks
The model is trained only on data before the test period, then its recommendations are compared with what was actually baked. On sold-out days true demand is unknown, so Breadcast's waste is counted as if demand equalled sales. That only makes Breadcast look worse, never better.
| Product | Service level | Waste now | Waste with Breadcast | Waste rate | Units sold | Margin |
|---|
Day by day
- Actually baked
- Sold
- Breadcast recommendation
- Sold out (demand unknown)
What the model learned for this product
Tomorrow's bake plan
| Product | Bake | Demand range25–90% quantile | Same weekday last week | Main driversvs. an average day |
|---|
How we measure success
Breadcast is judged by two numbers each week: the waste rate (unsold items ÷ baked items) and the sold-out rate (days a product ran out before closing). Success means a lower waste rate over four weeks without a higher sold-out rate or lower margin than the four weeks before. The backtest above is the same measurement applied to the past.
How it works
- Model: a linear quantile regression on log sales per product, with weekday, season, holiday, weather and recent sales features, trained with Adam on the pinball loss directly in your browser.
- Censored demand: when everything was sold, true demand was higher than sales. Those days only penalise under-prediction, so the model does not learn that sell-outs mean "low demand".
- Decision: the quantile is the newsvendor critical ratio (price − cost) ÷ (price − value if unsold + extra cost of waste). Making waste more expensive lowers the target and the bake quantity.
The sample bakery is synthetic. Its "actually baked" column follows a common rule of thumb (average of the last four same weekdays plus 20%). Results on real data will differ.