normalization.thermosensitive — explanation
Goal
Compare an offer using consumption recorded under abnormal climate (e.g. a
cold winter) against a "normal" climate baseline. The method removes the
weather-driven variance from the consumption series so the offer comparison
isolates the underlying tariff structure, not the weather.
Model
A piecewise-linear heating-degree-day model on daily aggregates:
```
daily_kwh ≈ base_kwh + α · HDD(T_day)
HDD(T) = max(0, base_temp − T)
```
base_kwh — the non-thermosensitive baseload (lighting, appliances, …)
α — the thermosensitive slope (kWh per °C-day below base_temp)
base_temp — the heating threshold (default 17 °C, fittable)
Algorithm
(α, base_temp) are supplied, skip the fit.
(T_day, daily_kwh):
- For each candidate base_temp ∈ {14, 15, 16, 17, 18, 19, 20}, regress
daily_kwh on HDD(T_day; base_temp). Pick the base_temp with the
highest R²; report its (α, base_kwh).
T_day with the
corresponding T_normal_day and recompute:
```
daily_kwh_normal = daily_kwh − α · (HDD(T_day) − HDD(T_normal_day))
```
The annual total is then sum(daily_kwh_normal).
Limits
year the fit is noisy.
base_temp search grid is coarse on purpose: finer grids overfit on small
samples.