de
All references

[ forecasting × artisan food ]

Know today what goes over the counter tomorrow.

In a butcher's shop rich in tradition, demand was estimated by experience for decades. Today a forecasting system unifies the sales data from stores, webshop, and vending machines into one source of truth and predicts every night, for every article, what the next 14 days will need, including a reliable range. This page shows how the system came to be, which decisions stand behind it, and what was learned along the way.

One source of truth

Registers, webshop, and vending machines merge safely into one shared sales history.

Models in competition

From simple baselines to a neural network: the best model combination became the final forecasting model.

Forecast with a range

Per article and day: the greater the uncertainty, the wider the band and the more the master butcher's experience counts. On average, always right!

Retrained every night

After closing time the model retrains completely, in eleven seconds, and picks up every change immediately.

[ the challenge in the trade ]

Gut feeling is experience. But it is not planning.

The butcher's trade is a craft rich in tradition and under pressure: skilled workers are scarce, the owner helps out in production, and little time is left for the back office. In many shops, digitalization ends at the register. So demand for the coming days is estimated: by experience and feel. On good days that is surprisingly accurate. On all the others, it gets expensive.

Produce too much and you get waste: goods are thrown away, or process costs pile up for reworking them, say when ground meat ends up in a lasagna that was never part of the assortment. Produce too little and you have to rerun production ad hoc, with setup costs nobody planned for. Or the customer faces an empty counter: the lost sale, quietly the most expensive mistake of all.

With the forecast, the business knows with reliable probability which article is needed in which quantity. Attention returns to value creation instead of guesswork: dependable planning, less waste, happy customers.

[ every night, automatically ]

While the shop sleeps, the plan for the business takes shape

The forecast is not a tool someone has to operate but a routine that runs by itself every night. After closing time the data moves through these stages, and in the morning the plan for the next 14 days is ready.

[ Collect ]

All sales channels

After closing time the day's sales flow into the system: every receipt from the stores, every order from the webshop, every purchase from the vending machines. Each booking gets a unique key. Duplicates are ruled out, even if a day is loaded twice.

[ Unify ]

One source of truth

The channels are merged into one sales history per article. What matters is the total quantity: production is central, sales happen everywhere. Only this single view turns three systems into a solid basis for planning.

[ Enrich ]

Every day with context

Every day gets its characteristics: weekday, public holidays and bridge days per state, school vacations, movable feasts like Easter, and the weather too. The system detects on its own which days the business is closed, without anyone maintaining it.

[ Train ]

The model keeps learning

The forecasting model receives new information every night and calculates in around eleven seconds. If demand shifts, say because a competitor closes, that flows into the model over time.

[ Forecast ]

14 days ahead

For every article the forecast for the next 14 days takes shape, not as one bare number but as a range: the expected sale and the quantity to have ready so the counter almost never runs empty.

[ Plan ]

From value to decision

By morning the forecasts have become a production plan: articles are bundled into production groups, say all varieties of ground meat into one shared quantity. And the system watches itself: if reality drifts away from the forecast, it corrects itself.

[ architecture ]

Rolling planning you can rely on

The data foundation turns three channels into one truth, the model factory makes methods compete instead of trusting one, and the planning layer translates probabilities into decisions.

Data foundation

Three sales channels, one sales history

Registers, webshop, and vending machines speak three different languages. Dedicated adapters translate them into one shared format, with a unique key per booking: reloading is safe, nothing is counted twice.

The merge happens on the article number, which is valid across all stores. That sounds obvious but was one of the most important decisions: only then does each article get a continuous history back to 2022, around 100,000 observations.

Every day is stored with its context: public holidays per state, school vacations, opening days, and weather. Training and forecasting work on the same data.

Model factory

Parameter study and competition instead of model faith

Before a model is allowed to forecast anything, it has to beat the baselines: the same weekday last week or seasonal averages, to name just two. Then several methods competed against each other, from statistical models to a neural network, all in the same rolling backtest.

A large parameter study examined the explanatory factors systematically and with statistical rigor. What went into production is a combination of methods that estimates not one number but three: lower edge, expected value, upper edge. A calibration makes sure the range keeps its promise.

Planning layer

From probability to production decision

Too little and too much are not equally expensive. That is why the system delivers two values: the expected sale for planning, and the provisioning recommendation that leaves the counter empty on only about one day in ten. The safety buffer becomes visible and adjustable.

The system forecasts what is forecastable: the highest-revenue articles, which carry around 80 percent of revenue. Articles selling one or two units a day cannot be predicted meaningfully day by day, so they are planned by week. That is not cost-cutting, it is being honest about the numbers.

[ accuracy ]

How good is the forecast, really?

Accuracy is a question of planning level. On the hardest question, how much of exactly this article on exactly this day, the system is right in a good 6 out of 10 cases. Per article and week it is 3 out of 4, for the daily total across all articles more than 8 out of 10. And the range that provisioning relies on holds on almost 9 out of 10 days. Measured on around 36,000 real article-days across 18 months, always on data the model had never seen.

For perspective: simple rules of thumb reach around 30 percent at article level. And even a perfect oracle would only reach about 77 percent at these volumes, because daily demand at a few sales per article is to a large degree genuine chance. On that scale the model has covered about two thirds of the achievable distance, making it around 45 percent more accurate than seasonal baselines.

Just as important as the hits: knowing when to be careful. When the gap between expected sale and provisioning recommendation grows unusually wide, say around holidays with bridge days, that is an honest signal for the master's double-check.

[ numbers ]

The system in numbers

3 → 1

sales channels, registers, webshop, and vending machines, unified into one source of truth

90%

of the forecasts come true: actual sales stay inside the forecast range

1.8×

the accuracy of seasonal baselines, from around 45% less forecasting error

11 seconds

for the nightly forecast that the planning is built on

[ technology ]

Technology in use

Nixtla
scikit-learn
Python
Django
Nixtla
scikit-learn
Python
Django
PostgreSQL
Docker
GitLab
PostgreSQL
Docker
GitLab

Put the potential of this technology to work.

Wondering where your processes still plan by gut feeling and what reliable forecasts would change there? Then let's talk: you bring the challenge, I bring the experience and the tools.