RIQDProvider#

class openstef_beam.evaluation.metric_providers.RIQDProvider(**data: Any) None[source]

Bases: MetricProvider

Provides Relative Inter Quantile Distance metrics.

Measures the average distance between symmetric quantiles (e.g., 0.1 and 0.9), normalized by the measurement range. For each quantile, finds its symmetric counterpart and computes rIQD between them.

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).

median_quantile: float
measurement_range_lower_q: float
measurement_range_upper_q: float
compute_probabilistic(y_true: ndarray[tuple[Any, ...], dtype[floating]], y_pred: ndarray[tuple[Any, ...], dtype[floating]], quantiles: ndarray[tuple[Any, ...], dtype[floating]]) dict[Quantile | Literal['global'], dict[str, Annotated[float, BeforeValidator(func=_convert_none_to_nan, json_schema_input_type=PydanticUndefined)]]][source]

Compute rIQD for each quantile by finding its symmetric counterpart.

For each quantile q, finds the symmetric quantile (1-q) and computes rIQD between them. Only processes quantiles for which a symmetric counterpart is available.

Parameters:
Returns:

QuantileMetricsDict containing rIQD metrics for each processable quantile.

Return type:

dict[Union[Quantile, Literal['global']], dict[str, float]]

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].