SubsetMetric#
- class openstef_beam.evaluation.SubsetMetric(**data: Any) None[source]#
Bases:
BaseModelContainer for evaluation metrics computed on a data subset.
Stores performance metrics organized by quantile and window, enabling detailed analysis of forecast quality across different probability levels and temporal periods.
- Parameters:
data (
Any)
- metrics: dict[Quantile | Literal['global'], dict[str, Annotated[float, BeforeValidator(func=_convert_none_to_nan, json_schema_input_type=PydanticUndefined)]]]#
- to_dataframe() DataFrame[source]#
Convert the metrics to a pandas DataFrame.
- Return type:
- Returns:
DataFrame with quantiles as index and metric names as columns.
- get_metric(quantile: Quantile | Literal['global'], metric_name: str) Annotated[float, BeforeValidator(func=_convert_none_to_nan, json_schema_input_type=PydanticUndefined)] | None[source]#
Retrieve a specific metric value for a given quantile.