pub struct HookSystem { /* private fields */ }Expand description
Hook system for prediction callbacks
Implementations§
Source§impl HookSystem
impl HookSystem
Sourcepub fn add_pre_fit_hook(&self, hook: Box<dyn PreFitHook>)
pub fn add_pre_fit_hook(&self, hook: Box<dyn PreFitHook>)
Add pre-fit hook
Sourcepub fn add_post_fit_hook(&self, hook: Box<dyn PostFitHook>)
pub fn add_post_fit_hook(&self, hook: Box<dyn PostFitHook>)
Add post-fit hook
Sourcepub fn add_pre_predict_hook(&self, hook: Box<dyn PrePredictHook>)
pub fn add_pre_predict_hook(&self, hook: Box<dyn PrePredictHook>)
Add pre-predict hook
Sourcepub fn add_post_predict_hook(&self, hook: Box<dyn PostPredictHook>)
pub fn add_post_predict_hook(&self, hook: Box<dyn PostPredictHook>)
Add post-predict hook
Sourcepub fn add_error_hook(&self, hook: Box<dyn ErrorHook>)
pub fn add_error_hook(&self, hook: Box<dyn ErrorHook>)
Add error hook
Sourcepub fn execute_pre_fit_hooks(&self, context: &mut FitContext) -> Result<()>
pub fn execute_pre_fit_hooks(&self, context: &mut FitContext) -> Result<()>
Execute pre-fit hooks
Sourcepub fn execute_post_fit_hooks(
&self,
context: &FitContext,
result: &FitResult,
) -> Result<()>
pub fn execute_post_fit_hooks( &self, context: &FitContext, result: &FitResult, ) -> Result<()>
Execute post-fit hooks
Sourcepub fn execute_pre_predict_hooks(
&self,
context: &mut PredictContext,
) -> Result<()>
pub fn execute_pre_predict_hooks( &self, context: &mut PredictContext, ) -> Result<()>
Execute pre-predict hooks
Sourcepub fn execute_post_predict_hooks(
&self,
context: &PredictContext,
predictions: &mut Array1<f64>,
) -> Result<()>
pub fn execute_post_predict_hooks( &self, context: &PredictContext, predictions: &mut Array1<f64>, ) -> Result<()>
Execute post-predict hooks
Sourcepub fn execute_error_hooks(&self, context: &ErrorContext) -> Result<()>
pub fn execute_error_hooks(&self, context: &ErrorContext) -> Result<()>
Execute error hooks
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HookSystem
impl RefUnwindSafe for HookSystem
impl Send for HookSystem
impl Sync for HookSystem
impl Unpin for HookSystem
impl UnwindSafe for HookSystem
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