pub trait ParamGuard {
type Checked;
type Error: Error;
// Required methods
fn check_ref(&self) -> Result<&Self::Checked, Self::Error>;
fn check(self) -> Result<Self::Checked, Self::Error>;
// Provided method
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