ABCD#

class capymoa.drift.detectors.ABCD[source]#

Bases: BaseDriftDetector

__init__(
delta_drift: float = 0.002,
delta_warn: float = 0.01,
model_id: str = 'ae',
split_type: str = 'ed',
encoding_factor: float = 0.5,
update_epochs: int = 50,
num_splits: int = 20,
max_size: int = inf,
subspace_threshold: float = 2.5,
n_min: int = 100,
maximum_absolute_value: float = 1.0,
bonferroni: bool = False,
)[source]#
Parameters:
  • delta_drift – The desired confidence level at which a drift is detected

  • delta_warn – The desired confidence level at which a warning is detected

  • model_id – The name of the model to use

  • update_epochs – The number of epochs to train the AE after a change occurred

  • split_type – Investigation of different split types

  • subspace_threshold – Called tau in the paper

  • bonferroni – Use bonferroni correction to account for multiple testing?

  • encoding_factor – The relative size of the bottleneck

  • maximum_absolute_value – The maximum absolute value that one can expect (e.g. 1.0 for normalized data). Smaller values can increase false alarms but speed up change detection

  • num_splits – The number of time point to evaluate

get_params() Dict[str, Any][source]#

Get the hyper-parameters of the drift detector.

pre_train(data)[source]#
add_element(element: float | ndarray | Instance) None[source]#

Add the new element and also perform change detection :param element: The new observation :return:

loss()[source]#
get_dims_p_values() ndarray[source]#
get_drift_dims() ndarray[source]#
get_severity()[source]#
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?

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

Reset the drift detector.

Parameters:

clean_history – Whether to reset detection history, defaults to False