PyNNLF

Reliable net load forecasting evaluation, not just another new model.

PyNNLF (Python for Network Net Load Forecasting) is an open-source Python tool for comparing net load forecasting models with public datasets, simple benchmarks, cross-validation, and reproducible experiment outputs.

Net load is the underlying electricity load minus renewable energy generation. Net load forecasting means predicting that remaining demand over a future forecast horizon.

The research issue

Many papers claim superior forecasting accuracy. Fewer make the comparison easy to trust.

Since 2016, more than 102 academic papers have been published on net load forecasting. At least 84 introduced a novel model. However, many papers did not use simple benchmark models, relied on private datasets, or did not publicly share implementation code.

Typical excerpts found in net load forecasting papers include:

“… and it is concluded that the proposed method has higher prediction accuracy and better prediction effect …”
[1] Cao et al., 2023
“Comparative tests utilizing real-world data verify the superiority of the proposed method over other state-of-the-art net load forecasting algorithms.”
[2] Hu et al., 2024
“More-over, the performance of the BDLSTM model also dominates when compared with the best of the state-of-the-art methods, …”
[3] Sun et al., 2020
102+ net load forecasting papers since 2016
84 introduced a novel model
75% did not compare with naive or seasonal naive benchmarks
58% did not use a publicly available dataset
94%+ did not make their code publicly available

The tool

PyNNLF turns model comparison into a repeatable workflow.

Users define the forecast problem and model specification in a YAML file. PyNNLF prepares the data, creates lag and calendar features, runs cross-validation, and stores the result using a consistent output structure.

Dataset Forecast horizon Model and hyperparameters Cross-validated outputs

What it outputs

Accuracy, stability, runtime, plots, and trained models in one experiment folder.

Accuracy

Train and test errors, including RMSE and nRMSE.

Stability

Cross-validation standard deviation to show whether performance is consistent.

Runtime

Training time so accuracy can be weighed against computational cost.

Reproducibility

Fold-level forecasts, residuals, trained models, and recap files.

Use it

Install PyNNLF with pip and run an experiment from a YAML spec.

python -m pip install pynnlf
import pynnlf

pynnlf.init("example_project")
pynnlf.run_experiment("example_project/specs/experiment.yaml")

[1] H. Cao, L. Yang, H. Li, K. Wang, Net Power Prediction for High Permeability Distributed Photovoltaic Integration System, J. Phys. Conf. Ser., 2023. https://doi.org/10.1088/1742-6596/2418/1/012069.

[2] J. Hu, W. Hu, D. Cao, X. Sun, J. Chen, Y. Huang, Z. Chen, F. Blaabjerg, Probabilistic net load forecasting based on transformer network and Gaussian process-enabled residual modeling learning method, Renew. Energy 225 (2024). https://doi.org/10.1016/j.renene.2024.120253.

[3] M. Sun, T. Zhang, Y. Wang, G. Strbac, C. Kang, Using Bayesian Deep Learning to Capture Uncertainty for Residential Net Load Forecasting, IEEE Transactions on Power Systems 35 (2020) 188-201. https://doi.org/10.1109/TPWRS.2019.2924294.

Disclosure: PyNNLF is an open-source tool developed as part of Samhan's PhD study, which is funded by UNSW Sydney, Ausgrid, RACE for 2030, and the NSW Decarbonisation Innovation Hub (NSW Decarb Hub).