https://github.com/openclimatefix/ocf-ml-metrics
Collection of simple baseline models and metrics for standardized evaluation of OCF forecasting models
https://github.com/openclimatefix/ocf-ml-metrics
metrics
Last synced: about 1 year ago
JSON representation
Collection of simple baseline models and metrics for standardized evaluation of OCF forecasting models
- Host: GitHub
- URL: https://github.com/openclimatefix/ocf-ml-metrics
- Owner: openclimatefix
- License: mit
- Created: 2023-01-12T11:56:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-07T17:30:29.000Z (about 1 year ago)
- Last Synced: 2025-04-07T18:37:57.906Z (about 1 year ago)
- Topics: metrics
- Language: Python
- Size: 53.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ocf-ml-metrics
Collection of simple baseline models and metrics for standardized evaluation of OCF forecasting models.
This package computes a variety of baselines and error metrics
including persistence of both last value and last day of generation,
comparison to PVLive, and max and zero baselines.
## Installation
Install with `pip install ocf-ml-metrics`
## Usage
The easiest way to use this package is to use the
convenience function `ocf_ml_metrics.metrics.errors.compute_metrics` that
computes all the basic error metrics overall, with and without night time,
for different parts of the year, different times of day, and all forecast
horizons by default.
There is also `ocf_ml_metrics.evaluation.evaluation.evaluation` that computes metrics after taking in a pandas
dataframe. These metrics are computed for the raw values, normalized values, against simple baseline models,
and per ID in the input dataframe. The input dataframe required data can be found in the docstring
And example usage would be
```python
from ocf_ml_metrics.evaluation.evaluation import evaluation
import pandas as pd
results_df = pd.read_csv('')
metrics: dict = evaluation(results_df=results_df, model_name='')
```