ADWIN<T>

Models & Types · AiDotNet.DriftDetection

Implements ADWIN (ADaptive WINdowing) for concept drift detection.

Inheritance: DriftDetectorBase<T> → ADWIN<T>

For Beginners

ADWIN is a popular drift detector that maintains a variable-size window of recent observations. It automatically adjusts window size based on detected changes, shrinking when drift occurs and growing when the data is stable.

How It Works

How ADWIN works:

  • Maintains a sliding window of observations with efficient compression
  • For each new observation, checks if the window can be split into two sub-windows

with significantly different means

  • If a significant difference is found, drops the older portion (drift detected)
  • Uses the Hoeffding bound to determine statistical significance

Key Features:

  • Adapts window size automatically - no manual tuning needed
  • Provides theoretical guarantees on false positive/negative rates
  • Efficient O(log W) memory and time per observation (W = window size)

The delta parameter: Controls sensitivity to drift. Smaller values mean:

  • More sensitive to small changes
  • Fewer false negatives (missed drifts)
  • More false positives (spurious drift detections)

Typical values: 0.001 (sensitive) to 0.2 (conservative). Default: 0.002.

Reference: Bifet & Gavaldà, “Learning from Time-Changing Data with Adaptive Windowing” (2007)

Constructors

Constructor Summary
ADWIN(double delta, int maxBuckets) Creates a new ADWIN drift detector.

Properties

Property Summary
double Delta { get; } Gets the delta parameter (confidence level for drift detection).
int WindowSize { get; } Gets the current window size (number of observations in memory).

Methods

Method Summary
bool AddObservation(T value) Adds a new observation and checks for drift.
void Reset()