An open-access benchmark and toolbox for electricity price forecasting

Overview

epftoolbox

The epftoolbox is the first open-access library for driving research in electricity price forecasting. Its main goal is to make available a set of tools that ensure reproducibility and establish research standards in electricity price forecasting research.

The library has been developed as part of the following article:

  • Jesus Lago, Grzegorz Marcjasz, Bart De Schutter, Rafał Weron. "Forecasting day-ahead electricity prices: A review of state-of-the-art algorithms, best practices and an open-access benchmark". Applied Energy 2021; 293:116983. https://doi.org/10.1016/j.apenergy.2021.116983.

The library is distributed under the AGPL-3.0 License and it is built on top of scikit-learn, tensorflow, keras, hyperopt, statsmodels, numpy, and pandas.

Website: https://epftoolbox.readthedocs.io/en/latest/

Getting started

Download the repository and navigate into the folder

$ git clone https://github.com/jeslago/epftoolbox.git
$ cd epftoolbox

Install using pip

$ pip install .

Navigate to the examples folder and check the existing examples to get you started. The examples include several applications of the two state-of-the art forecasting model: a deep neural net and the LEAR model.

Documentation

The documentation can be found here. It provides an introduction to the library features and explains all functionalities in detail. Note that the documentation is still being built and some functionalities are still undocumented.

Features

The library provides easy access to a set of tools and benchmarks that can be used to evaluate and compare new methods for electricity price forecasting.

Forecasting models

The library includes two state-of-the-art forecasting models that can be automatically employed in any day-ahead market without the need of expert knowledge. At the moment, the library comprises two main models:

  • One based on a deep neural network
  • A second based on an autoregressive model with LASSO regulazariton (LEAR).

Evaluation metrics

Standard evaluation metrics for electricity price forecasting including:

  • Multiple scalar metrics like MAE, sMAPE, or MASE.
  • Two statistical tests (Diebold-Mariano and Giacomini-White) to evaluate statistical differents in forecasting performance.

Day-ahead market datasets

Easy access to five datasets comprising 6 years of data each and representing five different day-ahead electricity markets:

  • The datasets represents the EPEX-BE, EPEX-FR, EPEX-DE, NordPool, and PJM markets.
  • Each dataset contains historical prices plus two time series representing exogenous inputs.

Available forecasts

Readily available forecasts of the state-of-the-art methods so that researchers can evaluate new methods without re-estimating the models.

Citation

If you use the epftoolbox in a scientific publication, we would appreciate citations to the following paper:

  • Jesus Lago, Grzegorz Marcjasz, Bart De Schutter, Rafał Weron. "Forecasting day-ahead electricity prices: A review of state-of-the-art algorithms, best practices and an open-access benchmark". Applied Energy 2021; 293:116983. https://doi.org/10.1016/j.apenergy.2021.116983.

Bibtex entry::

@article{epftoolbox,
title = {Forecasting day-ahead electricity prices: A review of state-of-the-art algorithms, best practices and an open-access benchmark},
journal = {Applied Energy},
volume = {293},
pages = {116983},
year = {2021},
doi = {https://doi.org/10.1016/j.apenergy.2021.116983},
author = {Jesus Lago and Grzegorz Marcjasz and Bart {De Schutter} and Rafał Weron}
}
Comments
  • Parameter names.

    Parameter names.

    trials_file_name must start the same like 'DNN_hyperparameters_nl' in _dnn_hyperopt.py and _dnn.py.

    'batch_normalization' key is not 'BN' self.model = DNNModel(neurons=neurons, n_features=Xtrain.shape[-1], dropout=self.best_hyperparameters['dropout'], batch_normalization=self.best_hyperparameters['BN'], batch_normalization=self.best_hyperparameters['batch_normalization'], lr=self.best_hyperparameters['lr'], verbose=False, optimizer='adam', activation=self.best_hyperparameters['activation'], epochs_early_stopping=20, scaler=self.scaler, loss='mae',

    opened by salihgunduz 4
  • DNN models 'path_hyperparameters_folder'

    DNN models 'path_hyperparameters_folder'

    LEAR examples are working fine, but I got error when I run "optimizing_hyperparameters_dnn.py"

    TypeError: _hyperopt_objective() got an unexpected keyword argument 'path_hyperparameters_folder'. I use windows 10. Is anything wrong about paths?

    And "recalibrating_dnn_simplified.py" gives this error: FileNotFoundError: [Errno 2] No such file or directory: '.\experimental_files\hyper_nl2_datPJM_YT2_SF_CW4_1'

    opened by salihgunduz 3
  • shuffle_train variable might break the code

    shuffle_train variable might break the code

    At the moment, the code only works if the same value for shuffle_train is used in hyperopt and recalibration. Ideally, one would use shuffle_train=0 for hyperopt and shuffle_train=1 for recalibration or shuffle_train=1 for hyperopt and shuffle_train=1 for recalibration.

    The first option is currently not supported. Best option is to remove the dependency of shuffle_train for recalibration as it is always 1, but leave it as input to represent the value of shuffle_train during hyperopt.

    opened by jeslago 0
  • ValueError with the LEAR model when using scikit-learn 1.1.0 or newer

    ValueError with the LEAR model when using scikit-learn 1.1.0 or newer

    Hi,

    Starting from version 1.1.0, scikit-learn class LassoLarsIC takes the keyword argument noise_variance. This causes an error with LEAR model if the calibration window is set to a relatively small value (e.g., 84 days, which is used in the paper). Here are the commands to reproduce the error:

    conda create -n epf_env python=3.9
    conda activate epf_env
    git clone https://github.com/jeslago/epftoolbox.git
    cd epftoolbox
    pip install .
    cd examples
    python recalibrating_lear_flexible.py --dataset PJM --years_test 2 --calibration_window 84
    
    ValueError: You are using LassoLarsIC in the case where the number of samples is smaller than the number of features. In this setting, getting a good estimate for the variance of the noise is not possible. Provide an estimate of the noise variance in the constructor.
    

    I obtained the above error with scikit-learn version 1.1.3. When I use scikit-learn 1.0.1, the LEAR model works fine.

    opened by ikonentj 1
  • Hyperparameter for Germany

    Hyperparameter for Germany

    Hi, I tried to replicate the forecast for the day ahead electricity prices for Germany, but the sMAPEs are too high, contrasting with the markets, like PJM, BE, and NP. Did you also run the Hyperparameter optimization (with max evals 1500) for DE? If yes, why the forecast for the DE market is not accurate?

    opened by rderayati 3
Owner
Applied Scientist At Amazon
null
Time-series-deep-learning - Developing Deep learning LSTM, BiLSTM models, and NeuralProphet for multi-step time-series forecasting of stock price.

Stock Price Prediction Using Deep Learning Univariate Time Series Predicting stock price using historical data of a company using Neural networks for

Abdultawwab Safarji 7 Nov 27, 2022
Price-Prediction-For-a-Dream-Home - A machine learning based linear regression trained model for house price prediction.

Price-Prediction-For-a-Dream-Home ROADMAP TO THIS LINEAR REGRESSION BASED HOUSE PRICE PREDICTION PREDICTION MODEL Import all the dependencies of the p

DIKSHA DESWAL 1 Dec 29, 2021
Multivariate Time Series Forecasting with efficient Transformers. Code for the paper "Long-Range Transformers for Dynamic Spatiotemporal Forecasting."

Spacetimeformer Multivariate Forecasting This repository contains the code for the paper, "Long-Range Transformers for Dynamic Spatiotemporal Forecast

QData 440 Jan 2, 2023
Event-forecasting - Event Forecasting Algorithms With Python

event-forecasting Event Forecasting Algorithms Theory Correlating events in comp

Intellia ICT 4 Feb 15, 2022
Forecasting for knowable future events using Bayesian informative priors (forecasting with judgmental-adjustment).

What is judgyprophet? judgyprophet is a Bayesian forecasting algorithm based on Prophet, that enables forecasting while using information known by the

AstraZeneca 56 Oct 26, 2022
Mixup for Supervision, Semi- and Self-Supervision Learning Toolbox and Benchmark

OpenSelfSup News Downstream tasks now support more methods(Mask RCNN-FPN, RetinaNet, Keypoints RCNN) and more datasets(Cityscapes). 'GaussianBlur' is

AI Lab, Westlake University 332 Jan 3, 2023
OpenMMLab Detection Toolbox and Benchmark

MMDetection is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.

OpenMMLab 22.5k Jan 5, 2023
OpenMMLab Semantic Segmentation Toolbox and Benchmark.

Documentation: https://mmsegmentation.readthedocs.io/ English | 简体中文 Introduction MMSegmentation is an open source semantic segmentation toolbox based

OpenMMLab 5k Dec 31, 2022
OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark

Introduction English | 简体中文 MMAction2 is an open-source toolbox for video understanding based on PyTorch. It is a part of the OpenMMLab project. The m

OpenMMLab 2.7k Jan 7, 2023
OpenMMLab Pose Estimation Toolbox and Benchmark.

Introduction English | 简体中文 MMPose is an open-source toolbox for pose estimation based on PyTorch. It is a part of the OpenMMLab project. The master b

OpenMMLab 2.8k Dec 31, 2022
tsai is an open-source deep learning package built on top of Pytorch & fastai focused on state-of-the-art techniques for time series classification, regression and forecasting.

Time series Timeseries Deep Learning Pytorch fastai - State-of-the-art Deep Learning with Time Series and Sequences in Pytorch / fastai

timeseriesAI 2.8k Jan 8, 2023
EasyMocap is an open-source toolbox for markerless human motion capture from RGB videos.

EasyMocap is an open-source toolbox for markerless human motion capture from RGB videos. In this project, we provide the basic code for fitt

ZJU3DV 2.2k Jan 5, 2023
MMDetection3D is an open source object detection toolbox based on PyTorch

MMDetection3D is an open source object detection toolbox based on PyTorch, towards the next-generation platform for general 3D detection. It is a part of the OpenMMLab project developed by MMLab.

OpenMMLab 3.2k Jan 5, 2023
AdelaiDepth is an open source toolbox for monocular depth prediction.

AdelaiDepth is an open source toolbox for monocular depth prediction.

Adelaide Intelligent Machines (AIM) Group 743 Jan 1, 2023
LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models

LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models. Developers can reproduce these SOTA methods and build their own methods.

TuZheng 405 Jan 4, 2023
MMFlow is an open source optical flow toolbox based on PyTorch

Documentation: https://mmflow.readthedocs.io/ Introduction English | 简体中文 MMFlow is an open source optical flow toolbox based on PyTorch. It is a part

OpenMMLab 688 Jan 6, 2023
An open source object detection toolbox based on PyTorch

MMDetection is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.

Bo Chen 24 Dec 28, 2022
mmfewshot is an open source few shot learning toolbox based on PyTorch

OpenMMLab FewShot Learning Toolbox and Benchmark

OpenMMLab 514 Dec 28, 2022