PeakMetricProvider#
- class openstef_beam.evaluation.metric_providers.PeakMetricProvider(*, quantiles: list[Quantile] | None = None, limit_pos: float = 0.5, limit_neg: float = -0.5, beta: float = 1.0)[source]
Bases:
MetricProviderProvides metrics for peak detection performance.
Computes precision, recall, and F-beta score for both standard and effective cases. Uses confusion matrix based on specified thresholds.
- 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).
- Overrides:
MetricProvider.metric_names
- limit_pos: float
- limit_neg: float
- beta: float
- compute_deterministic(y_true: NDArray[floating], y_pred: NDArray[floating], quantile: Quantile) dict[str, float][source]
Compute metrics for a single quantile prediction.
Must be implemented by subclasses that provide deterministic metrics (per quantile).
- Parameters:
- Return type:
- Overrides:
MetricProvider.compute_deterministic
- 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].