Skip to content

hsfs.core.statistics_comparison_config #

StatisticsComparisonConfig #

Defines a single metric comparison for feature monitoring.

Each instance specifies the metric to evaluate, a threshold for the difference, and whether the comparison is relative, strict, or against a fixed reference value.

Exactly one of metric (scalar) or distribution_metric (distribution) must be set.

bin_count property #

bin_count: int | None

Number of bins for the histogram.

binning_strategy property #

binning_strategy: str | None

Strategy used to discretize continuous features into histogram bins.

custom_bin_edges property #

custom_bin_edges: list[float] | None

Custom bin edges (required when binning_strategy is CUSTOM_EDGES).

distribution_metric property #

distribution_metric: str | None

Distribution distance metric for PDF-based comparison.

id property #

id: int | None

Identifier assigned by the backend upon registration.

metric property #

metric: str | None

Scalar metric used for the statistics comparison.

relative property #

relative: bool | None

Whether to compute the relative difference instead of the absolute one.

smoothing_epsilon property #

smoothing_epsilon: float | None

Small additive constant applied to bin probabilities to avoid log(0).

specific_value property #

specific_value: float | None

Fixed reference value to compare against instead of reference statistics.

strict property #

strict: bool | None

Whether the threshold comparison is strict (>) or non-strict (>=).

threshold property #

threshold: float | None

Threshold above which the difference triggers a shift alert.