ML Demand Forecasting for Retail & Supply Chain Teams

How machine learning sharpens demand forecasting in retail, FMCG and supply chain: the data, models, accuracy metrics and replenishment that work.

Machine learning forecasting estimates future demand at a granular level — for example SKU by store by week — by learning from sales history alongside drivers such as price, promotions, holidays, seasonality and stock availability. Gradient-boosted models and modern statistical methods are strong, practical options; the real improvement comes from clean data, hierarchical forecasts that planners can adjust, and linking forecasts straight to replenishment.

Why outgrow spreadsheet forecasting?

Spreadsheet and moving-average forecasts cope with a small number of stable products. They falter with thousands of SKUs, many locations, frequent promotions and events like festivals, when demand swings sharply and differently from region to region.

Machine learning models pick up these patterns across the entire catalogue in one go, so a new promotion or a regional festival is treated consistently instead of relying on individual judgement in each spreadsheet.

Data requirements for demand forecasting

Begin with the data most businesses already hold, then add to it:

Forecasting models that work in practice

Gradient-boosted trees like LightGBM and XGBoost, trained on lag features, calendar features and promotions, are robust and popular for retail demand. Statistical methods like exponential smoothing and ARIMA (via statsforecast, for example) are still strong baselines, particularly for stable series. Prophet is handy for series with obvious seasonality and holiday effects. Deep learning models like the Temporal Fusion Transformer can help with very large catalogues and many drivers.

In practice, an ensemble or a carefully tuned boosted model with good features generally outperforms one sophisticated model. Always benchmark against a simple baseline, such as the same period last year.

Measuring forecast accuracy

Pick metrics that mirror business impact. Weighted MAPE or WAPE weights errors by volume so fast movers count for more; bias reveals whether you consistently over- or under-forecast, which leads to excess stock or stock-outs. Measure at the level where decisions happen, and backtest over several past periods, promotions and festivals included.

Break accuracy down by segment — fast movers, slow movers, new products — since each calls for a different approach.

From forecasts to smarter inventory decisions

A forecast adds value only when it changes what gets ordered and where it is sent:

Keeping forecasts reliable in the long run

Run forecasting as a production system. Automate data pipelines, retrain on a schedule, monitor accuracy and drift with MLOps tooling like MLflow, and raise alerts when performance slips. Platforms such as Databricks make training and scoring thousands of series in parallel practical.

We build forecasting and demand-planning systems for retail, FMCG, insurance and supply-chain teams — our AI services page outlines our approach.

  • Sales or shipment history at your planning level (SKU, location, day or week) — preferably two years or more.
  • Price and promotion calendars, covering discounts and marketing campaigns.
  • Holidays and local events, which differ by region.
  • Stock-outs and availability, so lost sales are not misread as weak demand.
  • Product attributes and hierarchy, so new or slow-moving items can be forecast from similar ones.
  • Optional external signals like weather or market indices where they truly add value.
  • Hierarchical reconciliation keeps forecasts consistent across SKU, category and region.
  • Safety stock and reorder points are derived from forecast error and supplier lead times.
  • Replenishment suggestions feed straight into the ERP or ordering system.
  • Planners can review and override with notes, and the overrides are measured.
  • Exceptions — unusual spikes, drops or new items — are flagged for attention.