Expand description
A model wrapper that integrates drift detection into the predict → learn loop.
DriftAwareModel combines an online regressor, a drift detector, and a
drift strategy into a single component. On each learn call, the prediction
error is fed to the detector; if the detector reports a change, the strategy
decides the response action and the event is recorded.
§What the wrapper does and does not do
- Does: feed
|target - prediction|to the detector, recordDriftEvents, and executeResetModelwhen the strategy returns it. - Does not: auto-reset the model by default. The default
StaticStrategyreturnsNotifyOnlyfor both warning and drift, so the wrapper only logs events unless the caller configures a more aggressive strategy. - Does not: execute
ResetPreprocessor,ReplaceWithBaseline, orIncreaseAdaptationRate. These actions are recorded inlast_actionfor the caller to interpret.
§Space complexity
O(max_events) for the event log, plus the space of the wrapped model,
detector, and strategy.
Structs§
- Drift
Aware Model - A wrapper that feeds prediction errors to a drift detector and applies the strategy’s action when drift is detected.