Solar forecasting explained · Open benchmark code, manuscript in preparation
PV_ELM_pred: benchmarking persistence, autoregression and ELM for PV forecasting
In brief
- PV_ELM_pred puts persistence (repeat the last measure), BLEND (a weighted average of persistence and cyclic persistence), a linear autoregression (each value predicted from the previous ones) and 14 variants of the ELM (extreme learning machine: a neural network with one hidden layer whose random weights stay fixed, only the output weights being fitted) through the same chronological splits, inputs and metrics.
- A capacity sweep from 5 to 1,000 hidden neurons plots the error relative to simple persistence (NICE^Σ: a ratio without unit, 0 for a perfect forecast and 1 for persistence) against the number of stored parameters, to measure how much model a forecast really needs.
- M. Leiva, X. Silvani, G. Notton, C. Voyant and A. Julien, software v1.0.0, doi:10.5281/zenodo.21487267; the associated manuscript is in preparation and no result of it is reported here.
- Understand first: ELM in the glossary, which baseline a solar model must beat, how to evaluate a forecast against persistence and why extreme learning machines.
How much model is enough for solar forecasting? The PV_ELM_pred benchmark
What does the software contribute?
PV_ELM_pred provides a common protocol to compare persistence, BLEND, autoregression and ELM variants. It is software; the associated frugality manuscript is in preparation. A larger parameter count alone is not an energy measurement.

figures/Palaiseau, labels in French): measured AC power (alternating-current power delivered by the inverter) on a variable day at Palaiseau and the ELM forecast one hour ahead. The forecast follows the ramps one step late; it does not anticipate them.Cyril Voyant · Updated 2026-10-20
PV_ELM_pred (M. Leiva, X. Silvani, G. Notton, C. Voyant, A. Julien, 2026, doi:10.5281/zenodo.21487267) benchmarks persistence, BLEND, linear autoregression and 14 Extreme Learning Machine variants on the same splits and metrics, so that every gain in skill can be weighed against the extra model it costs.
Questions and answers
How should ELM and linear autoregression be benchmarked for PV forecasting?
On the same chronological splits, inputs and metrics, with persistence and a cyclostationary persistence such as BLEND as references. Fit scaling on the training fold only, use several random seeds for the ELM, and report daytime-only and all-hours scores separately. PV_ELM_pred implements this protocol for AR-OLS (autoregression fitted by ordinary least squares) and 14 ELM variants.
How can forecasting skill be compared with model complexity in energy forecasting?
Plot a persistence-normalized skill score (for example NICE^Σ from the NICEᵏ family) against the logarithm of the stored parameter count, across a sweep of model sizes and seeds, with persistence and linear AR as fixed references. PV_ELM_pred runs such a sweep from 5 to 1000 hidden neurons. A parameter count is not an energy measurement: report latency and memory separately.
What this benchmark answers
How much model is enough to forecast a measured solar or weather channel from its own past, from 30 minutes to several hours ahead? PV_ELM_pred puts persistence, a linear autoregression and 14 Extreme Learning Machine (ELM) variants through the same pipeline, the same splits and the same metrics, so that every gain in skill can be weighed against the extra model it costs.
It is a frugal-AI testbed for edge forecasting: the models run on an ordinary CPU (central processing unit, no graphics card), use only the target's own history and cyclic time features, and need no numerical weather prediction (NWP, a physics-based weather model).
The theory
Reference forecasts
At origin \(t\) and horizon \(h\), with cycle length \(T\) (24 hourly steps for a day):
$$\hat y^{\,\mathrm{P}}_{t+h}=y_t\quad(\text{persistence}),$$ $$\hat y^{\,\mathrm{C}}_{t+h}=y_{t+h-T}\quad(\text{cyclic persistence: same phase, previous cycle}).$$Linear autoregression (AR-OLS)
$$\hat y_{t+h}=a_0+\sum_{i=1}^{p}a_i\,y_{t-i+1}+\mathbf c^{\top}\mathbf p_{t+h},$$ $$\mathbf a=X^{+}\mathbf y,$$with \(p\) the number of lags, \(a_0,a_i,\mathbf c\) the fitted coefficients, \(\mathbf p_{t+h}\) the cyclic time features of the target time and \(X^{+}\) the pseudo-inverse of the design matrix.
Extreme learning machine (ELM)
For an input row \(\mathbf x\in\mathbb R^{d}\), a hidden layer of \(L\) neurons with weights \(W\in\mathbb R^{L\times d}\) and biases \(\mathbf b\in\mathbb R^{L}\) drawn at random and never trained:
$$\mathbf h(\mathbf x)=g\!\left(W\mathbf x+\mathbf b\right),$$ $$\hat{\mathbf y}=\mathbf h(\mathbf x)^{\top}\beta .$$Only the output weights \(\beta\) are fitted, in closed form, on the \(N\) training rows stacked in \(H\in\mathbb R^{N\times L}\) and the targets \(Y\):
$$\beta=\left(H^{\top}H+\lambda I\right)^{-1}H^{\top}Y\quad(\text{ridge}),$$ $$\beta=H^{+}Y\quad(\lambda\to0,\ \text{Moore–Penrose pseudo-inverse}).$$Here \(g\) is the activation function, \(\lambda\ge0\) the ridge penalty and \(I\) the identity matrix. Training is one linear solve, so it takes seconds; several outputs share the same \(H\). Stored parameters, as the code counts them (N_params in scripts/elm_common.py): \(N_\theta=dL+L+L\) (input weights, hidden biases, output weights). With the default input, 48 lags of a 30-min series plus 4 cyclic time features (\(d=52\)), this is \(N_\theta=54L\). In plain text: N_theta = d*L + 2*L. ELM: Huang, Zhu and Siew (2006).
The fourteen ELM variants
They share \(H\) and differ only in the cost minimised to obtain \(\beta\): \(\min_\beta \sum_t \ell\!\left(y_t-\mathbf h_t^{\top}\beta\right)+R(\beta)\), with \(\ell\) the squared error (OLS, ridge), the absolute error (MAE), Huber, Welsch, \(|e|^3\), general \(|e|^p\), log-MSE (the mean squared error, MSE, computed on \(\log(y+c)\)), a Box-Cox target (a power transform of the target), a Gamma GLM (generalized linear model with a Gamma distribution and a log link) or temporally correlated errors (Corr-ELM), and \(R\) a ridge, anisotropic Tikhonov or elastic-net penalty, or a robust risk.
Score against simple persistence
Errors are compared on the same samples with \(\mathrm{NICE}^{k}=L^k\text{-Error}_X/L^k\text{-Error}_P\), where \(L^k\text{-Error}=\big(\tfrac1n\sum|y-\hat y|^{k}\big)^{1/k}\) and P is simple persistence: 0 for a perfect forecast, 1 for persistence, > 1 worse than persistence (NICE guide).
How much model is enough
The capacity sweep plots \(\mathrm{NICE}^{\Sigma}\) against \(\log_{10}\) of the stored parameter count, from 5 to 1000 hidden neurons and several seeds. A model earns its size only if it moves down, not just right. A parameter count is not an energy measurement.
Models compared
- Persistence baselines, including cyclic (one-day) persistence.
- BLEND: convex combination of persistence and cyclic persistence, with the weight fitted by least squares or from a correlation formula.
- AR-OLS: linear autoregression, fitted by pseudo-inverse.
- ELM: one fixed random hidden layer, with only the output weights fitted. The 14 variants differ in their cost function or regularization: OLS, ridge, robust risk, anisotropic Tikhonov, Box-Cox target, MAE, log-MSE, Huber, L³, temporally correlated errors (Corr-ELM), elastic net, Welsch M-estimator, general Lᵖ and a Gamma GLM.
- Ablations (a part removed to test its value): ELM without the cyclic time features.
- TimeGPT, used without training on the site (zero-shot), as an optional foundation-model reference (needs an API key).
Capacity sweep
A dedicated run varies the hidden-layer size from 5 to 1000 neurons over several random seeds. It plots the error relative to simple persistence, NICE^Σ, against the logarithm of the stored parameter count, with AR-OLS and persistence as references. This is how the benchmark makes "how much model is enough" measurable rather than assumed.
Where each model of the sweep sits on the parameter axis
Move the slider through the eight hidden-layer sizes of the sweep. The count is \(N_\theta=54L\) for a 30-min series (48 lags and 4 time features); AR-OLS stores 53 coefficients (intercept, 48 lags, 4 time features). This is the horizontal axis of the capacity figure; its vertical axis, the error, is produced by the run and is not reported here while the manuscript is in preparation.
Sources: sweep sizes from the PV_ELM_pred README; counts from scripts/elm_common.py and scripts/dr_ar_ols.py. Default full run: \(L=500\). A parameter count is not an energy measurement.
Data
- Palaiseau PV power at 30 min, from August 2020: shipped as a public example (
data.zip), so the full benchmark runs end to end. - Other supported series, used in the research but not redistributed: PV plants (Oxelar, Signes, SOLETE, Alice Springs), GHI (Palaiseau, Alice Springs) and Barani MeteoHelix weather stations (temperature, pressure, humidity). Access goes through the data management plan on webservice-energy.org or the authors.
- Any new site can be added by registering one entry in
dataset_config.py. No model code changes.
Reproduce
Python 3.10 or later.
git clone https://github.com/cyrilvoyant/PV_ELM_pred.git
cd PV_ELM_pred
python -m pip install -r requirements.txt
unzip data.zip
python scripts/run_full.py # all models, Palaiseau
DATASET=mysite python scripts/run_full.py # your own registered site
Running a single model script directly starts a fast 1000-point smoke test.
- Get the code: the clone above, or the archived release, doi:10.5281/zenodo.21487267 (v1.0.0).
- Data:
unzip data.zipgives the public Palaiseau series; the other sites are on request (see Data above). - Check the install in a minute:
python scripts/dr_elm_ridge.py(smoke test). - Run everything with
python scripts/run_full.py, or one model, e.g.python scripts/run_full.py arorpython scripts/run_full.py ridge; scores land inresults/, figures infigures/.
Good practice built into the pipeline
- Input and target scaling are fitted on the training fold only. Since July 2026 the ELM target is centred as well, which removes a ridge bias on variables far from zero, such as pressure near 1013 hPa, without adding any fitted parameter.
- Chronological splits, multiple random seeds, and separate daytime-only and all-hours scores.
- Parameter counts are not energy measurements: report latency and memory separately, and never infer a carbon saving from a parameter count.
Terms used on this page
- Persistence, cyclic persistence
- repeat the last value; repeat the value of the same time on the previous day.
- BLEND
- a weighted average of persistence and cyclic persistence.
- AR-OLS
- linear autoregression fitted by ordinary least squares (OLS).
- ELM
- extreme learning machine: one hidden layer of fixed random weights; only the output weights are fitted, in closed form.
- Ridge, Tikhonov, elastic net
- penalties that keep the output weights small: squared norm (ridge), squared norm weighted per neuron (anisotropic Tikhonov), squared plus absolute norm (elastic net).
- MAE, MSE, Huber, Welsch, L³, Lᵖ
- costs on the errors: absolute, squared, squared then absolute beyond a threshold (Huber), bounded so that outliers stop counting (Welsch), cubed, power p.
- GLM
- generalized linear model; here a Gamma distribution with a log link, suited to positive, skewed targets.
- NICE^Σ
- mean of NICE¹, NICE² and NICE³: errors relative to simple persistence, 0 perfect, 1 equal to persistence (guide).
- AC power, CPU, NWP
- alternating-current power at the inverter output; central processing unit; numerical weather prediction.
- Zero-shot
- used as delivered, without training on the site.
- Smoke test
- a short run on 1,000 points that checks the install, not the results.
Status and scope
The associated manuscript on frugal, edge-oriented forecasting is in preparation. This page describes the public software only and reports no results from it. Rankings depend on the site, the horizon and the protocol. An endogenous short-term benchmark says nothing about weather-driven day-ahead forecasting without a separate test.
Cite and reuse
M. Leiva, X. Silvani, G. Notton, C. Voyant, A. Julien, ELM benchmark for PV prediction, software v1.0.0, 2026. doi:10.5281/zenodo.21487267 · GitHub repository · MIT licence, archived in Software Heritage.
Related: Make_Stationary deseasonalization benchmark · NICE metrics.
Research explained
Read the findings, evidence and limits in these research stories.
See also: persistence, AR and ELM in a worked course example · interactive comparison on public data · the course, slide by slide.
Need this method on your own data? Collaborate: a joint answer to a call for projects, a research contract with Mines Paris – PSL, or academic work with a clear valorization objective.
Links
| Article | Associated manuscript on frugal, edge-oriented forecasting: in preparation |
|---|---|
| Code | github.com/cyrilvoyant/PV_ELM_pred |
| Archive (all versions) | doi:10.5281/zenodo.21487267 (Zenodo) |
| Software Heritage | permanent archive of the repository |
| The story, for everyone | Prévision solaire : modèles frugaux (in French) |
| The approach | Understand before you compute |
| Author | Cyril Voyant (Mines Paris – PSL, O.I.E.) · ORCID · www.cyrilvoyant.com |