The setup

Generate 180 days of synthetic demand with a trend, a weekly pattern and random noise. Train on the first 140 days and evaluate on the final 40. All predictions use training data only.

Measured results

Error on the 40-day holdout. Lower is better; values are synthetic demand units.
ModelMAERMSE
Training mean22.57326.101
Weekday mean21.91423.046
Linear trend + weekly pattern4.65.728

MAE is the average absolute prediction error. RMSE penalizes larger errors more strongly. The model fits a linear trend and weekly sine/cosine features using least squares.

What this result means

The fitted model matches the assumptions used to generate the data. Its lower error shows that this implementation recovers that pattern; it does not establish performance on real demand or business impact.

  • The model matches the known data generator.
  • One chronological holdout; no rolling validation.
  • No real-world demand, deployment or business impact claims.

Reproduce it

Use Python 3 with NumPy 2.3.5 and pandas 3.0.1. Run the downloaded script with python demand-baseline.py. It creates the holdout predictions and metrics in a results folder. The random seed is fixed at 42.

Download the experiment script

Next experiment

Try a changing trend, missing observations and rolling evaluation. Then use an appropriately licensed public dataset and test whether the same approach still helps.