SEED#
- class capymoa.drift.detectors.SEED[source]#
Bases:
MOADriftDetector
Seed Drift Detector
Example:#
>>> import numpy as np >>> from capymoa.drift.detectors import SEED >>> np.random.seed(0) >>> >>> detector = SEED() >>> >>> 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: 4 - at index: 1023 Change detected in data: 6 - at index: 1343
Reference:#
Huang, David Tse Jung, et al. “Detecting volatility shift in data streams.” 2014 IEEE International Conference on Data Mining. IEEE, 2014.
- __init__(
- delta: float = 0.05,
- block_size: int = 32,
- epsilon_prime: float = 0.01,
- alpha: float = 0.8,
- compress_term: int = 75,
- 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