pub struct RetrainingTrigger { /* private fields */ }Expand description
Retraining trigger that combines multiple drift signals.
Implementations§
Source§impl RetrainingTrigger
impl RetrainingTrigger
Sourcepub fn new(n_features: usize, config: DriftConfig) -> Self
pub fn new(n_features: usize, config: DriftConfig) -> Self
Create a new retraining trigger.
Sourcepub fn with_consecutive_required(self, count: usize) -> Self
pub fn with_consecutive_required(self, count: usize) -> Self
Set consecutive detections required to trigger.
Sourcepub fn set_baseline_performance(&mut self, scores: &[f32])
pub fn set_baseline_performance(&mut self, scores: &[f32])
Set baseline performance scores.
Sourcepub fn set_baseline_features(&mut self, features: &Matrix<f32>)
pub fn set_baseline_features(&mut self, features: &Matrix<f32>)
Set baseline feature distributions.
Sourcepub fn observe_performance(&mut self, score: f32) -> bool
pub fn observe_performance(&mut self, score: f32) -> bool
Observe new performance score and check trigger.
Sourcepub fn is_triggered(&self) -> bool
pub fn is_triggered(&self) -> bool
Check if retraining is triggered.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RetrainingTrigger
impl RefUnwindSafe for RetrainingTrigger
impl Send for RetrainingTrigger
impl Sync for RetrainingTrigger
impl Unpin for RetrainingTrigger
impl UnwindSafe for RetrainingTrigger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more