pub enum UpdateStrategy {
Immediate,
Batch {
batch_size: usize,
},
TimeBased {
interval: Duration,
},
Adaptive {
drift_threshold: f64,
min_interval: Duration,
max_interval: Duration,
},
Custom {
trigger_fn: Box<dyn Fn(&StreamWindow, &StreamStats) -> bool + Send + Sync>,
},
}Expand description
Online learning update strategy
Variants§
Immediate
Update on every data point
Batch
Batch updates
TimeBased
Time-based updates
Adaptive
Adaptive updates based on drift detection
Fields
Custom
Custom update trigger
Fields
§
trigger_fn: Box<dyn Fn(&StreamWindow, &StreamStats) -> bool + Send + Sync>Update trigger function
Auto Trait Implementations§
impl Freeze for UpdateStrategy
impl !RefUnwindSafe for UpdateStrategy
impl Send for UpdateStrategy
impl Sync for UpdateStrategy
impl Unpin for UpdateStrategy
impl !UnwindSafe for UpdateStrategy
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