openstef_beam.metrics#
Metrics for measuring how well energy forecasting models perform.
Energy forecasting models can predict either single values (deterministic) or probability distributions (probabilistic). This module provides specialized metrics for both types, with particular focus on the operational challenges of energy systems like peak detection and scale differences between high and low load periods.
- What you can measure:
Forecast accuracy: How close are predictions to actual values?
Peak detection: Can the model identify congestion events?
Uncertainty quality: For probabilistic forecasts, are confidence intervals reliable?
Cross-period comparison: Compare model performance across seasons, times, etc.
Functions#
|
Calculate confusion matrix for peak detection in energy load. |
|
Calculate the Continuous Ranked Probability Score (CRPS) for probabilistic forecasts. |
|
Calculate the F-beta score from precision and recall metrics. |
|
Calculate the Mean Absolute Percentage Error (MAPE). |
|
Calculate the Mean Absolute Calibration Error (MACE) for probabilistic forecasts. |
|
Calculate the observed probability (empirical quantile) of predicted values. |
|
Calculate precision and recall metrics from a confusion matrix. |
|
Calculate the R² (coefficient of determination) score. |
|
Calculate the relative Continuous Ranked Probability Score (rCRPS). |
|
Calculate the relative Pinball Loss (also known as relative Quantile Loss). |
|
Calculate the relative Inter Quantile Distance (rIQD). |
|
Calculate the relative Mean Absolute Error (rMAE) using percentiles for range calculation. |
Classes#
|
Confusion matrix components for peak detection in energy forecasting. |
|
Container for precision and recall metrics. |