DataDriftResult#
- class capymoa.drift.detectors.DataDriftResult[source]#
Bases:
objectResult returned by a data-drift comparison.
Every comparison produces a
statistic. Statistical-test detectors also setp_value; distance-based detectors leave it asNoneand may setdistanceinstead.For univariate tests on multivariate data,
feature_statistics,feature_p_values, andfeature_is_driftmap feature index to that feature’s value. The top-levelstatisticandp_valueare aggregates (max statistic, min p-value).is_driftis the overall decision: for tests that produce p-values, after multiple-testing correction; for distance-based tests (no p-value), the per-feature decisions are combined without correction (seeBaseDataDriftDetector._test()).- __init__(
- is_drift: bool,
- statistic: float,
- p_value: float | None = None,
- distance: float | None = None,
- feature_statistics: dict[Hashable, float] | None = None,
- feature_p_values: dict[Hashable, float] | None = None,
- feature_is_drift: dict[Hashable, bool] | None = None,
- feature_is_drift: dict[Hashable, bool] | None = None#
Per-feature drift flags. Keys are feature names when available, otherwise integer indices.
Nonefor multivariate tests.
- feature_p_values: dict[Hashable, float] | None = None#
Per-feature p-values. Keys are feature names when available, otherwise integer indices.
Nonewhen the test has no p-value or for multivariate tests.
- feature_statistics: dict[Hashable, float] | None = None#
Per-feature statistics. Keys are feature names when available, otherwise integer indices.
Nonefor multivariate tests.