BaseDriftDetector#

class capymoa.drift.base_detector.BaseDriftDetector[source]#

Bases: LearnerParamsMixin, ABC

Drift Detector

__init__()[source]#
abstract add_element(element: float) → None[source]#

Update the drift detector with a new input value.

Parameters:

element – A value to update the drift detector with. Usually, this is the prediction error of a model.

detected_change() → bool[source]#

Is the detector currently detecting a concept drift?

detected_warning() → bool[source]#

Is the detector currently warning of an upcoming concept drift?

classmethod from_params(
schema: Any = None,
params: dict[str, Any] | None = None,
random_seed: int = 1,
) → Any[source]#

Construct an instance from parameters produced by get_params.

get_params() → dict[str, Any][source]#

Return the hyper-parameters captured from the constructor.

reset(clean_history: bool = False) → None[source]#

Reset the drift detector.

Parameters:

clean_history – Whether to reset detection history, defaults to False

REQUIRES_FIT: bool = False#

If True, this detector needs a reference distribution before it can detect change. Concept drift detectors leave this as False and only use add_element().