Energy forecast benchmarking toolkit.
Project description
Energy Forecast Benchmark Toolkit
Energy Forecast Benchmark Toolkit is a Python project that aims to provide common tools to benchmark forecast models.
Documentation: https://attila-balint-kul.github.io/energy-forecast-benchmark-toolkit/
Datasets
Dashboards
Table of Contents
Installation
Use the package manager pip to install foobar.
pip install enfobench
Usage
Download the HuggingFace Dataset 'EDS-lab/electricity-demand', and download the files from the data folder to your computer.
import pandas as pd
from enfobench import Dataset
from enfobench.datasets import ElectricityDemandDataset
from enfobench.evaluation import cross_validate, evaluate_metrics
from enfobench.evaluation.metrics import mean_bias_error, mean_absolute_error, root_mean_squared_error
# Load the dataset from the folder that you downloaded the files to.
ds = ElectricityDemandDataset("/path/to/the/dataset/folder/that/contains/all/subsets")
# List all meter ids
ds.list_unique_ids()
# Get one of the meter ids
unique_id = ds.list_unique_ids()[0]
# Get dataset for a specific meter id
target, past_covariates, metadata = ds.get_data_by_unique_id(unique_id)
# Create a dataset
dataset = Dataset(
target=target,
past_covariates=past_covariates,
future_covariates=None,
metadata=metadata
)
# Import your model and instantiate it
model = MyForecastModel()
# Run cross validation on your model
cv_results = cross_validate(
model,
dataset,
start_date=pd.Timestamp("2018-01-01"),
end_date=pd.Timestamp("2018-01-31"),
horizon=pd.Timedelta("24 hours"),
step=pd.Timedelta("1 day"),
)
# Simply pass in the cross validation results and the metrics you want to evaluate.
metrics = evaluate_metrics(
cv_results,
metrics={
"MBE": mean_bias_error,
"MAE": mean_absolute_error,
"RMSE": root_mean_squared_error,
},
)
To get started with some examples check out the models
folder and the examples section of the documentation.
Benchmarking
Once confident in your model, you can submit for evaluation. The results of the benchmarks are openly accessible through various dashboards. The links you can find above.
Contributing
Contributions and feedback are welcome! For major changes, please open an issue first to discuss what you would like to change.
If you'd like to contribute to the project, please follow these steps:
Fork the repository. Create a new branch for your feature or bug fix. Make your changes and commit them. Push your changes to your forked repository. Submit a pull request describing your changes.
License
BSD-3-Clause license
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file enfobench-0.7.0.tar.gz
.
File metadata
- Download URL: enfobench-0.7.0.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bac2d66e09cab0ca628ad7a6c7f351b5cef5c76191db0d81cbdd323b9cc325c7 |
|
MD5 | fb67ab4b7c20c1926b74d183f16adac6 |
|
BLAKE2b-256 | 659b73d5837866b5c47cb8f4f7202a0184ef4a041a50f29b1624f28c40286bea |
File details
Details for the file enfobench-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: enfobench-0.7.0-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82719bca7a9a4be4982f358b7a95ef1d1543a060f863a3ab8d9f72e494f07331 |
|
MD5 | e2f89a268c74f584a7a201b3bc019525 |
|
BLAKE2b-256 | 03850e3c4439b4dd206f444266383f563ccac384262926ba14a2e4b1d2e46d03 |