IDriftDetector<T>
Interfaces · AiDotNet.DriftDetection
Interface for concept drift detectors in streaming/online learning scenarios.
Known implementations: DriftDetectorBase<T>
For Beginners
Concept drift occurs when the statistical properties of data change over time. For example, customer behavior patterns may shift seasonally, or spam email characteristics may evolve. Drift detectors monitor incoming data and alert when significant changes are detected, signaling that a model may need retraining.
How It Works
Types of Drift:
- Sudden drift: Abrupt change (e.g., system upgrade, policy change)
- Gradual drift: Slow transition between concepts over time
- Incremental drift: Small continuous changes that accumulate
- Recurring drift: Concepts that reappear periodically (e.g., seasonal)
Common Approaches:
- Error-rate based: Monitor classifier errors (DDM, EDDM)
- Distribution-based: Compare data distributions over windows (ADWIN)
- Sequential analysis: Cumulative sum tests (Page-Hinkley)
When to use: Any online learning scenario where data distribution may change: fraud detection, recommendation systems, sensor monitoring, financial trading, etc.
Properties
| Property | Summary |
|---|---|
bool IsInDrift { get; } |
Gets whether drift has been detected. |
bool IsInWarning { get; } |
Gets whether a warning signal has been triggered (pre-drift indicator). |
double DriftProbability { get; } |
Gets the estimated probability that drift has occurred. |
double EstimatedMean { get; } |
Gets the current estimated mean of the stream. |
int ObservationCount { get; } |
Gets the total number of observations processed since the last reset. |
Methods
| Method | Summary |
|---|---|
bool AddObservation(T value) |
Adds a new observation to the drift detector. |
void Reset() |
Resets the detector to its initial state. |