pub struct EarlyStoppingMonitor { /* private fields */ }Expand description
Early stopping monitor
Implementations§
Source§impl EarlyStoppingMonitor
impl EarlyStoppingMonitor
Sourcepub fn new(strategy: EarlyStoppingStrategy, config: EarlyStoppingConfig) -> Self
pub fn new(strategy: EarlyStoppingStrategy, config: EarlyStoppingConfig) -> Self
Create a new early stopping monitor
Sourcepub fn should_stop(&self) -> bool
pub fn should_stop(&self) -> bool
Check if early stopping criteria are met
Sourcepub fn best_result(&self) -> (f64, usize)
pub fn best_result(&self) -> (f64, usize)
Get the best score and iteration
Sourcepub fn min_iterations_reached(&self) -> bool
pub fn min_iterations_reached(&self) -> bool
Check if minimum iterations have been reached
Sourcepub fn convergence_metrics(&self) -> ConvergenceMetrics
pub fn convergence_metrics(&self) -> ConvergenceMetrics
Get convergence metrics
Trait Implementations§
Source§impl EarlyStoppingCallback for EarlyStoppingMonitor
impl EarlyStoppingCallback for EarlyStoppingMonitor
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 EarlyStoppingMonitor
impl RefUnwindSafe for EarlyStoppingMonitor
impl Send for EarlyStoppingMonitor
impl Sync for EarlyStoppingMonitor
impl Unpin for EarlyStoppingMonitor
impl UnwindSafe for EarlyStoppingMonitor
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