pub struct EarlyStopping { /* private fields */ }Expand description
Early stopping callback.
Implementations§
Trait Implementations§
Source§impl<P: ParamKey> Callback<P> for EarlyStopping
impl<P: ParamKey> Callback<P> for EarlyStopping
Source§fn on_trial_end(&mut self, _trial_num: usize, result: &TrialResult<P>)
fn on_trial_end(&mut self, _trial_num: usize, result: &TrialResult<P>)
Called after each trial with results.
Source§fn should_stop(&self) -> bool
fn should_stop(&self) -> bool
Return true to stop optimization early.
Source§fn on_start(&mut self, _space: &SearchSpace<P>)
fn on_start(&mut self, _space: &SearchSpace<P>)
Called at the start of optimization.
Source§fn on_trial_start(&mut self, _trial_num: usize, _trial: &Trial<P>)
fn on_trial_start(&mut self, _trial_num: usize, _trial: &Trial<P>)
Called before each trial.
Source§fn on_end(&mut self, _best: Option<&TrialResult<P>>)
fn on_end(&mut self, _best: Option<&TrialResult<P>>)
Called at the end of optimization.
Auto Trait Implementations§
impl Freeze for EarlyStopping
impl RefUnwindSafe for EarlyStopping
impl Send for EarlyStopping
impl Sync for EarlyStopping
impl Unpin for EarlyStopping
impl UnwindSafe for EarlyStopping
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