MMohan Vishe
All projects
Machine learningTested

Rossmann Sales Forecasting

Daily sales for 1,115 stores, forecast six weeks out — and measured against the baselines that are hard to beat.

View code on GitHubJupyter NotebookMIT

The setup

Rossmann's store managers forecast daily sales up to six weeks ahead. The model gets exactly what they would have: store metadata, the calendar, promotions, school and state holidays, and competition timing — nothing measured on the day being forecast. The holdout is the last six weeks of the data (40,282 open store-days), models train on everything before it, and scoring uses RMSPE, the competition's own metric.

What the numbers say

ModelRMSPE ↓R²
Naive: same weekday, 364 days earlier0.17180.8306
Naive: store × weekday × promo median0.14490.8585
Ridge0.15670.8551
LightGBM0.12350.9195

A good baseline is hard to beat. A lookup table of store × weekday × promo beats the linear model outright; most of the signal is which store, which day, promo or not. LightGBM is the only model that clears it — a 14.8% reduction in RMSPE — and 81% of its split gain comes from two store-level encodings learned from the training period alone.

Keeping the forecast honest

The first version of this project scored R² 0.965 with same-day customer counts among its inputs — a number no forecast has six weeks ahead. The rebuild removes it and measures its effect instead: added back, it roughly halves the error (RMSPE 0.0628), which is exactly why it cannot be used. A test now fails the pipeline if any feature for a given day reads data from that day or later.

What I am building next

Per-store error analysis on the stores the model gets most wrong, and a rolling-origin evaluation across several six-week windows instead of one.