STEPD#
- class capymoa.drift.detectors.STEPD[source]#
Bases:
MOADriftDetector
Statistical Test of Equal Proportions Drift Detector
Example:#
>>> import numpy as np >>> from capymoa.drift.detectors import STEPD >>> np.random.seed(0) >>> >>> detector = STEPD() >>> >>> data_stream = np.random.randint(2, size=2000) >>> for i in range(999, 2000): ... data_stream[i] = np.random.randint(4, high=8) >>> >>> for i in range(2000): ... detector.add_element(data_stream[i]) ... if detector.detected_change(): ... print('Change detected in data: ' + str(data_stream[i]) + ' - at index: ' + str(i)) Change detected in data: 6 - at index: 1001
Reference:#
Nishida, Kyosuke, and Koichiro Yamauchi. “Detecting concept drift using statistical testing.” International conference on discovery science. Berlin, Heidelberg: Springer Berlin Heidelberg, 2007.
- __init__(
- window_size: int = 30,
- alpha_drift: float = 0.003,
- alpha_warning: float = 0.05,
- CLI: str | None = None,
- Parameters:
moa_detector – The MOA detector object or class identifier.
CLI – The command-line interface (CLI) configuration for the MOA drift detector, defaults to None