enfobench


Nameenfobench JSON
Version 0.5.1 PyPI version JSON
download
home_pageNone
SummaryEnergy forecast benchmarking toolkit.
upload_time2024-03-25 12:38:39
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords benchmarking energy forecasting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Energy  Forecast Benchmark Toolkit

[![PyPI version](https://badge.fury.io/py/enfobench.svg)](https://badge.fury.io/py/enfobench)
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
[![code style - Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff)
[![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy)

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/

**Source code**: https://github.com/attila-balint-kul/energy-forecast-benchmark-toolkit


## Datasets

**Electricity demand**: https://huggingface.co/datasets/EDS-lab/electricity-demand


## Dashboards

**Electricity demand**: https://api.wandb.ai/links/attila-balint-kul/vqvezsl0


## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)

---

## Installation

Use the package manager pip to install foobar.

```bash
pip install enfobench
```

## Usage

Download the HuggingFace Dataset ['EDS-lab/electricity-demand'](https://huggingface.co/datasets/EDS-lab/electricity-demand),
and download the files from the data folder to your computer.

```python
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](https://attila-balint-kul.github.io/energy-forecast-benchmark-toolkit/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 2-Clause License

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "enfobench",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "benchmarking, energy, forecasting",
    "author": null,
    "author_email": "attila.balint@kuleuven.be",
    "download_url": "https://files.pythonhosted.org/packages/97/50/de43cbbd6b65275909735506c44bf8a397879c2754fdac94918ac9825173/enfobench-0.5.1.tar.gz",
    "platform": null,
    "description": "# Energy  Forecast Benchmark Toolkit\n\n[![PyPI version](https://badge.fury.io/py/enfobench.svg)](https://badge.fury.io/py/enfobench)\n[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)\n[![code style - Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff)\n[![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy)\n\nEnergy Forecast Benchmark Toolkit is a Python project that aims to provide common tools to\nbenchmark forecast models.\n\n---\n\n**Documentation**: https://attila-balint-kul.github.io/energy-forecast-benchmark-toolkit/\n\n**Source code**: https://github.com/attila-balint-kul/energy-forecast-benchmark-toolkit\n\n\n## Datasets\n\n**Electricity demand**: https://huggingface.co/datasets/EDS-lab/electricity-demand\n\n\n## Dashboards\n\n**Electricity demand**: https://api.wandb.ai/links/attila-balint-kul/vqvezsl0\n\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Installation\n\nUse the package manager pip to install foobar.\n\n```bash\npip install enfobench\n```\n\n## Usage\n\nDownload the HuggingFace Dataset ['EDS-lab/electricity-demand'](https://huggingface.co/datasets/EDS-lab/electricity-demand),\nand download the files from the data folder to your computer.\n\n```python\nimport pandas as pd\n\nfrom enfobench import Dataset\nfrom enfobench.datasets import ElectricityDemandDataset\nfrom enfobench.evaluation import cross_validate, evaluate_metrics\nfrom enfobench.evaluation.metrics import mean_bias_error, mean_absolute_error, root_mean_squared_error\n\n# Load the dataset from the folder that you downloaded the files to.\nds = ElectricityDemandDataset(\"/path/to/the/dataset/folder/that/contains/all/subsets\")\n\n# List all meter ids\nds.list_unique_ids()\n\n# Get one of the meter ids\nunique_id = ds.list_unique_ids()[0]\n\n# Get dataset for a specific meter id\ntarget, past_covariates, metadata = ds.get_data_by_unique_id(unique_id)\n\n# Create a dataset\ndataset = Dataset(\n    target=target,\n    past_covariates=past_covariates,\n    future_covariates=None,\n    metadata=metadata\n)\n\n# Import your model and instantiate it\nmodel = MyForecastModel()\n\n# Run cross validation on your model\ncv_results = cross_validate(\n    model,\n    dataset,\n    start_date=pd.Timestamp(\"2018-01-01\"),\n    end_date=pd.Timestamp(\"2018-01-31\"),\n    horizon=pd.Timedelta(\"24 hours\"),\n    step=pd.Timedelta(\"1 day\"),\n)\n\n# Simply pass in the cross validation results and the metrics you want to evaluate.\nmetrics = evaluate_metrics(\n    cv_results,\n    metrics={\n        \"MBE\": mean_bias_error,\n        \"MAE\": mean_absolute_error,\n        \"RMSE\": root_mean_squared_error,\n    },\n)\n```\n\nTo get started with some examples check out the `models` folder and the [examples](https://attila-balint-kul.github.io/energy-forecast-benchmark-toolkit/examples) section of the documentation.\n\n## Benchmarking\n\nOnce confident in your model, you can submit for evaluation.\nThe results of the benchmarks are openly accessible through various dashboards. The links you can find above.\n\n\n## Contributing\n\nContributions and feedback are welcome! For major changes, please open an issue first to discuss\nwhat you would like to change.\n\nIf you'd like to contribute to the project, please follow these steps:\n\nFork the repository.\nCreate a new branch for your feature or bug fix.\nMake your changes and commit them.\nPush your changes to your forked repository.\nSubmit a pull request describing your changes.\n\n## License\n\nBSD 2-Clause License\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Energy forecast benchmarking toolkit.",
    "version": "0.5.1",
    "project_urls": {
        "Documentation": "https://github.com/attila-balint-kul/energy-forecast-benchmark-toolkit#readme",
        "Issues": "https://github.com/attila-balint-kul/energy-forecast-benchmark-toolkit/issues",
        "Source": "https://github.com/attila-balint-kul/energy-forecast-benchmark-toolkit"
    },
    "split_keywords": [
        "benchmarking",
        " energy",
        " forecasting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c24bd48e843adacb7887d219ffd3308e762cd1de63076bea03e6d8be3609f8d",
                "md5": "e96671d589f7f174617844a8f597c4f5",
                "sha256": "a4c8445dd32a1c64e362a851b934bb363a1bfdcb0d846884f8ac2f8dcd833052"
            },
            "downloads": -1,
            "filename": "enfobench-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e96671d589f7f174617844a8f597c4f5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 20688,
            "upload_time": "2024-03-25T12:38:38",
            "upload_time_iso_8601": "2024-03-25T12:38:38.760579Z",
            "url": "https://files.pythonhosted.org/packages/6c/24/bd48e843adacb7887d219ffd3308e762cd1de63076bea03e6d8be3609f8d/enfobench-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9750de43cbbd6b65275909735506c44bf8a397879c2754fdac94918ac9825173",
                "md5": "4fd66e7493c864d92bd3a5b73875503f",
                "sha256": "ba09cff98a09aa5e67fa42d7b26d8cc2a503446398463346948fd0850698b177"
            },
            "downloads": -1,
            "filename": "enfobench-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4fd66e7493c864d92bd3a5b73875503f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 23614,
            "upload_time": "2024-03-25T12:38:39",
            "upload_time_iso_8601": "2024-03-25T12:38:39.900367Z",
            "url": "https://files.pythonhosted.org/packages/97/50/de43cbbd6b65275909735506c44bf8a397879c2754fdac94918ac9825173/enfobench-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-25 12:38:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "attila-balint-kul",
    "github_project": "energy-forecast-benchmark-toolkit#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "enfobench"
}
        
Elapsed time: 0.21640s