Trait linfa::param_guard::ParamGuard
source · 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.
Required Associated Types§
Required Methods§
Provided Methods§
sourcefn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
fn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
Calls check()
and unwraps the result