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

The checked hyperparameters

Error type resulting from failed hyperparameter checking

Required methods

Checks the hyperparameters and returns a reference to the checked hyperparameters if successful

Checks the hyperparameters and returns the checked hyperparameters if successful

Provided methods

Calls check() and unwraps the result

Implementors