How it works
The same loop every day: forecast demand, catch leftovers while they can still sell or be rescued, then prove the waste went down.
01
Each morning the model estimates how many units of each product will sell today — using recent sales, price, and Pakistan holidays and events.
02
Later in the day, surplus scan compares stock still on the shelf with the hour-of-day curve and expiry. You approve a discount if leftovers won’t sell.
03
What still qualifies (allergens, shelf life, partner capacity) can go to a food bank. The partner accepts and confirms pickup.
What the forecast uses
XGBoost predicts daily quantity per product. You can train, predict a date, and backfill recent days. Accuracy is shown as MAE and MAPE. Hour of day is used later for surplus — it is not a forecast feature.
Which day of the week — Monday demand is not Sunday demand.
A weekend flag so Saturday and Sunday patterns stand apart.
The unit price recorded on that day’s sales.
How today’s price compares with the recent 7-day average.
Lag of 1 day — what this product sold the day before.
Lag of 7 days — last week’s matching weekday.
Rolling mean of the last week of sales.
Rolling mean of the last two weeks.
Which SKU, so each item keeps its own pattern.
Bread, pastry, or sandwich family.
Pakistan public holidays from the events calendar.
Whether the date falls in Ramadan.
Eid day itself.
How close the date is to the next Eid.
The rush days just before Eid.
You confirm provisional dates (moon sighting). Confirmed events feed the holiday flags.
Who uses it
Run one bakery: products, sales, forecasts, surplus, discounts, rescue approvals, and reports. Each bakery only sees its own data.
A food bank or pickup partner sees offers, accepts or declines, and confirms when food is collected.
What the system includes
Why WasteLess
01
The daily model does not guess the hour. After the forecast, surplus uses hour-of-day curves and batch expiry so evening leftovers are obvious.
02
Discounts and rescues are suggestions. Nothing is applied until you approve it.
03
The weekly waste PDF compares discarded units with last week, so improvement is a number — not only a chart.