RMAEPeakHoursProvider#
- class openstef_beam.evaluation.metric_providers.RMAEPeakHoursProvider(**data: Any) None[source]
Bases:
MetricProviderProvides Relative Mean Absolute Error metrics for peak hours only (8:00-20:00).
Normalizes MAE using specified quantile bounds but only considers data points between 8:00 and 20:00 hours.
- Parameters:
data (
Any)
- property metric_names: frozenset[str]
Declared metric names that this provider produces.
Override in subclasses to enable eager metric-name validation (e.g. in the hyperparameter tuner).
-
lower_quantile:
float
-
upper_quantile:
float
-
start_peak_hours:
int
-
end_peak_hours:
int
- __call__(subset: ForecastDataset) dict[Quantile | Literal['global'], dict[str, Annotated[float, BeforeValidator(func=_convert_none_to_nan, json_schema_input_type=PydanticUndefined)]]][source]
Process an evaluation subset and return metrics.
Extracts predictions and ground truth from the subset, then computes metrics for all relevant quantiles.
- compute_deterministic(y_true: ndarray[tuple[Any, ...], dtype[floating]], y_pred: ndarray[tuple[Any, ...], dtype[floating]], quantile: float) dict[str, Annotated[float, BeforeValidator(func=_convert_none_to_nan, json_schema_input_type=PydanticUndefined)]][source]
Compute metrics for a single quantile prediction.
Must be implemented by subclasses that provide deterministic metrics (per quantile).
- Parameters:
- Return type:
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'protected_namespaces': ()}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].