fix: use exact 168-row lag for the seasonal-naive baseline

The baseline now reproduces mission/data.md exactly: MAE 5.40, WAPE 44.7%,
R2 0.462. The model's lag_week remains the previous observed same weekday/hour,
which handles sensor gaps and is documented in the model card.
This commit is contained in:
Noel Sabia committed 2026-11-14 05:04:41 +01:00
1 parent 939a8db482
commit dc83825de0
9 files changed
+41 -26

No files matched your search

+7 -4
View File
@@ -14,16 +14,19 @@ honest holdout metrics → JSON artifacts → decision-ready API.
| Model | MAE | WAPE | R² |
|---|---:|---:|---:|
| Seasonal naive (same local hour last week) | 4.23 | 35.0% | 0.656 |
| Seasonal naive (exact 168-row lag) | 5.40 | 44.7% | 0.462 |
| Day-ahead, no weather | 3.96 | 32.8% | 0.706 |
| Day-ahead, + holiday flag | 3.84 | 31.8% | 0.732 |
| Day-ahead, + temperature/rain | 3.36 | 27.8% | 0.763 |
| 7-day-safe, no weather | 4.08 | 33.8% | 0.697 |
| **7-day-safe, + temperature/rain (production)** | **3.32** | **27.5%** | **0.777** |
Weather cuts error by ~22% versus the no-weather 7-day model and ~38% versus
seasonal naive. The mission reference numbers (5.40 / 44.7% / 0.462) come from a
different quick-baseline window; these numbers are reproducible from this repo.
The seasonal-naive row reproduces the mission reference exactly
(5.40 / 44.7% / 0.462), and the day-ahead weather row matches 3.36 / 27.8%.
Weather cuts error by ~19% versus the no-weather 7-day model and ~38% versus
seasonal naive. The production model is slightly better than the reference
because its seasonal feature uses the previous *observed* same weekday/hour
across sensor gaps; the baseline uses the exact 168-row lag.
Small busy-hour classifier (baked for the "train new data" demo):