pub struct FtrlParams<F: Float, R: Rng>(_);

Implementations

Create new hyperparameters with pre-defined values

Create new hyperparameters with pre-defined random number generator

Set the learning rate.

Defaults to 0.005 if not set

alpha must be positive and finite

Set the beta parameter.

Defaults to 0.0 if not set

beta must be positive and finite

Set l1_ratio parameter. Controls how the parameter

Defaults to 0.5 if not set

l1_ratio must be between 0.0 and 1.0.

Set l2_ratio parameter. Controls how the parameter penalty is distributed to L2 regularization.

Defaults to 0.5 if not set

l2_ratio must be between 0.0 and 1.0.

Set random number generator. Used to initialize Z values

Defaults to Xoshiro256Plus

rng must have Clone trait implemented.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Validate the hyper parameters

The checked hyperparameters

Error type resulting from failed hyperparameter checking

Checks the hyperparameters and returns the checked hyperparameters if successful

Calls check() and unwraps the result

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.