Trait linfa::param_guard::ParamGuard [−][src]
pub trait ParamGuard {
type Checked;
type Error: Error;
fn check_ref(&self) -> Result<&Self::Checked, Self::Error>;
fn check(self) -> Result<Self::Checked, Self::Error>;
fn check_unwrap(self) -> Self::Checked
where
Self: Sized,
{ ... }
}
Expand description
A set of hyperparameters whose values have not been checked for validity. A reference to the
checked hyperparameters can only be obtained after checking has completed. If the
Transformer
, Fit
, or FitWith
traits have been implemented on the checked
hyperparameters, they will also be implemented on the unchecked hyperparameters with the
checking step done automatically.
The hyperparameter validation done in check_ref()
and check()
should be identical.
Associated Types
Required methods
Checks the hyperparameters and returns a reference to the checked hyperparameters if successful
Provided methods
fn check_unwrap(self) -> Self::Checked where
Self: Sized,
fn check_unwrap(self) -> Self::Checked where
Self: Sized,
Calls check()
and unwraps the result