pub struct AdaptiveEarlyStopping { /* private fields */ }Expand description
Adaptive early stopping that adjusts parameters based on optimization progress
Implementations§
Source§impl AdaptiveEarlyStopping
impl AdaptiveEarlyStopping
Sourcepub fn new(
strategy: EarlyStoppingStrategy,
config: EarlyStoppingConfig,
adaptation_config: AdaptationConfig,
) -> Self
pub fn new( strategy: EarlyStoppingStrategy, config: EarlyStoppingConfig, adaptation_config: AdaptationConfig, ) -> Self
Create a new adaptive early stopping monitor
Sourcepub fn update_adaptive(&mut self, score: f64) -> Result<()>
pub fn update_adaptive(&mut self, score: f64) -> Result<()>
Update with adaptive behavior
Sourcepub fn monitor(&self) -> &EarlyStoppingMonitor
pub fn monitor(&self) -> &EarlyStoppingMonitor
Get the underlying monitor
Sourcepub fn monitor_mut(&mut self) -> &mut EarlyStoppingMonitor
pub fn monitor_mut(&mut self) -> &mut EarlyStoppingMonitor
Get the underlying monitor mutably
Sourcepub fn adaptation_history(&self) -> &[(usize, usize)]
pub fn adaptation_history(&self) -> &[(usize, usize)]
Get adaptation history
Trait Implementations§
Source§impl EarlyStoppingCallback for AdaptiveEarlyStopping
impl EarlyStoppingCallback for AdaptiveEarlyStopping
fn on_iteration(&mut self, score: f64) -> Result<bool>
fn on_early_stop(&mut self, reason: &str) -> Result<()>
fn best_score(&self) -> f64
fn convergence_info(&self) -> String
Auto Trait Implementations§
impl Freeze for AdaptiveEarlyStopping
impl RefUnwindSafe for AdaptiveEarlyStopping
impl Send for AdaptiveEarlyStopping
impl Sync for AdaptiveEarlyStopping
impl Unpin for AdaptiveEarlyStopping
impl UnwindSafe for AdaptiveEarlyStopping
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