pub struct RetrainOrchestrator<M, D>{ /* private fields */ }Expand description
Automatic retraining orchestrator
Monitors predictions for drift and triggers retraining when needed.
Implementations§
Source§impl<M> RetrainOrchestrator<M, ADWIN>where
M: OnlineLearner + Debug,
impl<M> RetrainOrchestrator<M, ADWIN>where
M: OnlineLearner + Debug,
Sourcepub fn new(model: M, n_features: usize) -> RetrainOrchestrator<M, ADWIN>
pub fn new(model: M, n_features: usize) -> RetrainOrchestrator<M, ADWIN>
Create an orchestrator with ADWIN detector (recommended default)
Source§impl<M, D> RetrainOrchestrator<M, D>
impl<M, D> RetrainOrchestrator<M, D>
Sourcepub fn with_detector(
model: M,
detector: D,
n_features: usize,
) -> RetrainOrchestrator<M, D>
pub fn with_detector( model: M, detector: D, n_features: usize, ) -> RetrainOrchestrator<M, D>
Create with custom drift detector
Sourcepub fn with_config(
model: M,
detector: D,
n_features: usize,
config: RetrainConfig,
) -> RetrainOrchestrator<M, D>
pub fn with_config( model: M, detector: D, n_features: usize, config: RetrainConfig, ) -> RetrainOrchestrator<M, D>
Create with custom configuration
Sourcepub fn observe(
&mut self,
features: &[f64],
target: &[f64],
prediction: &[f64],
) -> Result<ObserveResult, AprenderError>
pub fn observe( &mut self, features: &[f64], target: &[f64], prediction: &[f64], ) -> Result<ObserveResult, AprenderError>
Sourcepub fn stats(&self) -> &OrchestratorStats
pub fn stats(&self) -> &OrchestratorStats
Get orchestrator statistics
Sourcepub fn drift_status(&self) -> DriftStatus
pub fn drift_status(&self) -> DriftStatus
Get current drift status
Sourcepub fn force_retrain(&mut self) -> Result<(), AprenderError>
pub fn force_retrain(&mut self) -> Result<(), AprenderError>
Force a retrain (useful for manual triggers)
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Get buffer size
Sourcepub fn should_retrain(&self) -> bool
pub fn should_retrain(&self) -> bool
Check if retraining is recommended
Sourcepub fn config(&self) -> &RetrainConfig
pub fn config(&self) -> &RetrainConfig
Get configuration
Trait Implementations§
Auto Trait Implementations§
impl<M, D> Freeze for RetrainOrchestrator<M, D>
impl<M, D> RefUnwindSafe for RetrainOrchestrator<M, D>where
M: RefUnwindSafe,
D: RefUnwindSafe,
impl<M, D> Send for RetrainOrchestrator<M, D>where
M: Send,
impl<M, D> Sync for RetrainOrchestrator<M, D>where
M: Sync,
impl<M, D> Unpin for RetrainOrchestrator<M, D>
impl<M, D> UnsafeUnpin for RetrainOrchestrator<M, D>where
M: UnsafeUnpin,
D: UnsafeUnpin,
impl<M, D> UnwindSafe for RetrainOrchestrator<M, D>where
M: UnwindSafe,
D: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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