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
| Model | MAE | RMSE |
|---|---|---|
| Training mean | 22.573 | 26.101 |
| Weekday mean | 21.914 | 23.046 |
| Linear trend + weekly pattern | 4.6 | 5.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.
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.