WAPE of the selected LightGBM model, protected 2024 test
Mean over 12 regions, horizons 1–24
4.87 %
WAPE of the regional Ridge reference, same test
12 × 24
Regions × hourly horizons from every forecast origin
Overview
Grid operators balance supply and demand hour by hour. This project forecasts mean hourly
electricity demand for each of the 12 mainland French regions, 1 to 24 hours ahead, from public
RTE data. The focus is an evaluation that can be trusted: features use only what would be
published at forecast time, the model is chosen by a rule fixed in advance, and the 2024 test year
was opened once. On that test, LightGBM reached a mean regional WAPE of 3.66 %, against
4.87 % for a regional Ridge reference.
What a forecast may know
Regional demand is assumed to be published two hours late. A forecast issued at hour t may
therefore use observations up to t−2 only, in development, in testing and in operation alike.
Figure 1 · SchematicOne forecast origin. Grey cells are usable; the hatched hours exist but are not yet published. Each of the 24 horizons has its own model.
Accuracy is the weighted absolute percentage error per region r and calendar year P,
averaged with equal weight over region–years so that small regions count as much as
Île-de-France:
Four model families produce the same 24 forecasts per region and origin: a weekly naive
benchmark that repeats the value one week earlier, ARIMA and seasonal ARIMA with five fixed
orders, Ridge regression (one model per horizon, pooled or per region), and LightGBM
(24 horizon models trained on absolute error, 40 Optuna trials).
Figure 2 · SchematicExpanding-window folds select the model; the frozen specification is then refitted on 2017–2023 and scored once on 2024.
The 2024 release had to pass four predeclared gates: complete predictions; a 95 % paired
block-bootstrap interval for the WAPE difference against Ridge lying below zero; no region more
than 5 % worse than Ridge; and empirical coverage of the 90 % prediction intervals between 85 %
and 95 %.
Results
Development error of the non-LightGBM candidates
Primary WAPE (%) — mean of region–year WAPEs, validation 2021–2023. Lower is better.
Data table
Model
Primary WAPE (%)
MAE (MW)
RMSE (MW)
Bias (MW)
Regional Ridge
5.11
212
300
16.9
Pooled Ridge
5.35
221
311
8.8
SARIMA(2,0,0)(1,0,0)₂₄
5.6
233
351
12.5
SARIMA(1,0,0)(1,0,0)₂₄
5.91
245
370
7.1
Weekly naive
8.34
349
545
9.9
ARIMA(2,1,0)
11.43
491
683
1.5
ARIMA(1,1,1)
11.86
510
708
1.5
ARIMA(1,1,0)
12.41
537
750
1.4
Figure 3 · Experimental resultRegional Ridge was the strongest classical model and the reference LightGBM had to beat. LightGBM's search was still running when this snapshot was taken; its 2024 score is below.Source: model_comparison.csv (repository commit 5fe66b7); 2021–2023, all regions and horizons, same eligible rows for every model.
Among the classical models, regional Ridge was the strongest in development (5.11 %). ARIMA
without a daily seasonal term cannot reproduce the intraday profile and stays above 11 %.
Error by forecast horizon
Primary WAPE (%) at each horizon h = 1, …, 24 hours, validation 2021–2023.
Weekly naive
SARIMA(2,0,0)(1,0,0)₂₄
Regional Ridge
Data table
Horizon (h)
Weekly naive
SARIMA(2,0,0)(1,0,0)₂₄
Regional Ridge
1
8.34
3.47
4.46
2
8.34
3.98
4.65
3
8.34
4.35
4.78
4
8.34
4.63
4.82
5
8.34
4.81
4.8
6
8.34
4.97
4.77
7
8.34
5.12
4.76
8
8.34
5.26
4.77
9
8.34
5.4
4.84
10
8.34
5.54
5.03
11
8.34
5.68
5.25
12
8.34
5.8
5.44
13
8.34
5.9
5.54
14
8.33
5.97
5.55
15
8.33
6.03
5.51
16
8.33
6.09
5.47
17
8.33
6.14
5.41
18
8.33
6.18
5.33
19
8.33
6.22
5.26
20
8.33
6.26
5.16
21
8.33
6.27
4.97
22
8.33
6.36
4.85
23
8.33
6.82
5.39
24
8.33
7.23
5.75
Figure 4 · Experimental resultSARIMA is better for the first four hours, when recent demand dominates; Ridge, driven by the calendar and weekly lags, is better from horizon 5.Source: horizon_wape_equal_region_year.csv, same snapshot as the development comparison.
Protected test, 2024 (run once)
Mean regional WAPE
LightGBM, selected configuration
3.66 %
Regional Ridge (reference)
4.87 %
LightGBM cut the error by about a quarter and passed all four gates. Trees capture interactions,
such as the same hour on a winter weekday or a school holiday, that a linear model only sees
through hand-built terms. Adding temperature under a safe 48-hour delay lowered Ridge's
development WAPE by only 0.02 pp, so weather stayed a challenger.
Figure 5 · SchematicThe installable Python package, from public data to an unfinished shadow pilot. Dashed: weather feeds challenger models only.
Raw downloads carry checksums, and the release pipeline refuses to run the protected evaluation
if code, data or dependencies changed after the freeze.
Limitations and status
One test year. 2024 is a single realisation; year-to-year reliability is not established.
Availability is simulated. The test replays revised data with a two-hour delay; it is not a record of historical live retrievals.
Pilot unfinished. The protocol requires seven consecutive days of complete records. The repository has tooling for a local pilot and no completed pilot record.
Individual contribution
I designed the information rule and the
evaluation protocol, and implemented the data pipeline, models, release tooling, API, dashboard
and a methodological report.
A team data-science project linking daily temperature to regional electricity consumption (2020–2024): data assembly from RTE and NASA POWER, regional fixed-effects regressions, and predictive models evaluated on a held-out year.
Machine Learning & Forecasting · Team of 3 · Python, pandas, statsmodels
Box–Jenkins analysis of a monthly French industrial production index (1990–2026): stationarity testing, ARMA order selection, residual diagnostics and a joint 95 % prediction region for the next two observations.
Statistics & Econometrics · Team of 2 · R, tseries, stats::arima