Skip to main content

Module aware_model

Module aware_model 

Source
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, record DriftEvents, and execute ResetModel when the strategy returns it.
  • Does not: auto-reset the model by default. The default StaticStrategy returns NotifyOnly for both warning and drift, so the wrapper only logs events unless the caller configures a more aggressive strategy.
  • Does not: execute ResetPreprocessor, ReplaceWithBaseline, or IncreaseAdaptationRate. These actions are recorded in last_action for the caller to interpret.

§Space complexity

O(max_events) for the event log, plus the space of the wrapped model, detector, and strategy.

Structs§

DriftAwareModel
A wrapper that feeds prediction errors to a drift detector and applies the strategy’s action when drift is detected.