National demand forecasting · Python + R
Day-ahead Electricity Demand Forecast Review
A forecast analyst has tomorrow's half-hour demand curve and two proposed corrections. The question is not which model looks most sophisticated. It is whether either one improves the published forecast consistently enough to deserve controlled review.
R reduces mean absolute error by 2.1% and wins five of six origins. Python improves it by 0.7%, while its nominal 80% range covers 72.6% of outcomes.
For 2026-04-09/SP30, the later outturn is 25,045 MW. The published forecast remains the operating reference while R moves only to further controlled review.
This is a retrospective comparison. It does not establish future accuracy or authorise an operating change.
- Public source rows checked
- 94,050
- Held-out forecasts
- 8,066
- Rolling origins
- 6
- Published forecast MAE
- 697.9 MW
The working decision
Should the review process change?
The forecast analyst prepares the comparison for a demand-planning lead. Advancing the R correction means investigating it beside the current forecast under controlled conditions. It does not mean replacing the published curve or changing an operating instruction.
Weather, embedded generation, recurring calendar activity, special events and current system conditions remain outside this public model. Those are reasons for expert review, not details to conceal behind an aggregate score.
- 01Published forecast
- 02R and Python corrections
- 03Six seasonal tests
- 04Controlled review
- 05Demand-planning decision
Rolling-origin evaluation
Averages do not hide where a correction loses.
The tests begin in January, April, July and October 2025, then January and April 2026. Each model learns from the previous two years and predicts the next 28 days.
Pre-agreed review test
Accuracy, consistency and uncertainty must agree.
A proposed correction must improve MAE by at least 2%, win four origins, control bias and peak error, and place 75% to 85% of outcomes inside its nominal 80% range.
- 01Timing boundarySix chronological origins
Each model fits the previous 730 days and scores the following 28 days.
- 02Leakage checkLater outturn withheld
The scoring rows contain only information available when the forecast is issued.
- 03Quarantined rows48 rows
The ambiguous 30 October 2022 clock-change day is excluded before modelling.
- 04Python and R row agreement8,066 predictions each
Both challengers use the same fold keys, published forecast and later outturn.
- 05Error and uncertaintyPoint and interval checks
MAE, bias, peak error and empirical interval coverage enter the selection test.
R linear correction
Advance to controlled review- MAE change
- −2.1%
- Origin wins
- 5 / 6
- Interval coverage
- 79.4%
- Checks passed
- 5 / 5
Python boosted correction
Do not advance- MAE change
- −0.7%
- Origin wins
- 4 / 6
- Interval coverage
- 72.6%
- Checks passed
- 3 / 5
One settlement-period trace
Follow the largest published-forecast miss in the final test.
2026-04-09/SP30 is deliberately an error review, not a typical period. The published forecast was issued on 8 April; the corrected outturn became available only after settlement period 30 on 9 April.
- 01Published forecast20,708 MW
Available at the retained issue time
- 02R linear correction20,580 MW
Compared, not adopted automatically
- 03Python boosted correction20,537 MW
Compared, not adopted automatically
- 04Corrected demand outturn25,045 MW
Observed after the target period
- 05Model-selection decisionr linear correction
Advance the R linear correction to controlled review.
- 06Demand-planning boundaryHuman review required
Check weather, embedded generation, events and operating conditions before changing the process
Inspect the executed analysis
The page is a reading layer over retained Python, R and forecast rows.
The native report, R session record and executed Jupyter notebook reproduce the figures shown above. The source file remains checksum-locked at the 12 August 2026 access point.
Complete generated report · 8 checks passed · R 4.6.1 · Python 3.12
The full 1,440 × 3,725 report retains the curve, every origin, the gate result, settlement-period review and limitations in one inspectable image.
Technical detailsView the source, feature contract, model comparison and limits
Source and grain
One NESO date and settlement period forms the business key. Forty-eight rows from the ambiguous 30 October 2022 clock-change day are quarantined in full; valid 46- and 50-period days remain.
R benchmark
Base R fits a linear correction to published-forecast residuals at each origin. Its model-based 80% prediction interval reaches 79.4% empirical coverage overall.
Python comparison
Scikit-learn gradient boosting predicts the residual median and 10th and 90th percentiles with fixed hyperparameters and seed 417. It does not use later outturn values at scoring time.
Decision limit
Further review must add operational inputs and governance. The example does not reproduce NESO's own method or direct system operation. It does not run as a live forecast.
Source and attribution
Supported by National Energy SO Open Data.
The retained resource is the Day Ahead Half Hourly Demand Forecast Performance file accessed 12 August 2026 under the NESO Open Data Licence v1.0. NESO does not endorse this independent analysis.
Discuss a forecasting review
Start with the issue time, the benchmark and the cost of a wrong decision.
A useful first discussion identifies what will be forecast, when the decision is made, what information exists then and how a proposed model must earn use.
