pub enum DriftAction {
NotifyOnly,
ReduceConfidence,
ResetModel,
ResetPreprocessor,
ReplaceWithBaseline,
IncreaseAdaptationRate,
}Expand description
The action to take when drift is detected.
This enum is returned by a DriftStrategy
and executed by DriftAwareModel.
Variants§
NotifyOnly
Record the event but do not change model behavior. This is the safest default and should be used when the cost of a wrong reset exceeds the cost of a slow adaptation.
ReduceConfidence
Lower the confidence associated with subsequent predictions. The interpretation is left to the caller (e.g. widen prediction intervals or flag predictions as uncertain).
ResetModel
Reset the wrapped model’s parameters to their initial state. Use when the concept drift is severe enough that relearning from scratch is faster than incremental adaptation.
ResetPreprocessor
Reset the preprocessor’s running statistics (e.g. StandardScaler mean and variance). Useful when feature distributions have shifted but the target relationship remains similar.
ReplaceWithBaseline
Replace the current model with a baseline model. The replacement logic is handled by the caller; this action signals intent.
IncreaseAdaptationRate
Increase the model’s adaptation rate (e.g. raise the learning rate) so it can relearn faster on the new distribution. The exact mechanism is model-dependent.
Implementations§
Source§impl DriftAction
impl DriftAction
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Returns a short, stable string identifier.
Possible values: "notify_only", "reduce_confidence",
"reset_model", "reset_preprocessor", "replace_with_baseline",
"increase_adaptation_rate".
Sourcepub const fn is_destructive(self) -> bool
pub const fn is_destructive(self) -> bool
Returns true if this action modifies the model or preprocessor state.
NotifyOnly and ReduceConfidence return false; all others return
true.
Trait Implementations§
Source§impl Clone for DriftAction
impl Clone for DriftAction
Source§fn clone(&self) -> DriftAction
fn clone(&self) -> DriftAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more