pub struct FtrlParams<F: Float, R: Rng>(/* private fields */);Implementations§
Source§impl<F: Float, R: Rng> FtrlParams<F, R>
impl<F: Float, R: Rng> FtrlParams<F, R>
Sourcepub fn new(alpha: F, beta: F, l1_ratio: F, l2_ratio: F, rng: R) -> Self
pub fn new(alpha: F, beta: F, l1_ratio: F, l2_ratio: F, rng: R) -> Self
Create new hyperparameters with pre-defined values
Sourcepub fn default_with_rng(rng: R) -> Self
pub fn default_with_rng(rng: R) -> Self
Create new hyperparameters with pre-defined random number generator
Sourcepub fn alpha(self, alpha: F) -> Self
pub fn alpha(self, alpha: F) -> Self
Set the learning rate.
Defaults to 0.005 if not set
alpha must be positive and finite
Sourcepub fn beta(self, beta: F) -> Self
pub fn beta(self, beta: F) -> Self
Set the beta parameter.
Defaults to 0.0 if not set
beta must be positive and finite
Sourcepub fn l1_ratio(self, l1_ratio: F) -> Self
pub fn l1_ratio(self, l1_ratio: F) -> Self
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.
Trait Implementations§
Source§impl<F: Clone + Float, R: Clone + Rng> Clone for FtrlParams<F, R>
impl<F: Clone + Float, R: Clone + Rng> Clone for FtrlParams<F, R>
Source§fn clone(&self) -> FtrlParams<F, R>
fn clone(&self) -> FtrlParams<F, R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F: Float, R: Rng> ParamGuard for FtrlParams<F, R>
impl<F: Float, R: Rng> ParamGuard for FtrlParams<F, R>
impl<F: Float, R: Rng> StructuralPartialEq for FtrlParams<F, R>
Auto Trait Implementations§
impl<F, R> Freeze for FtrlParams<F, R>
impl<F, R> RefUnwindSafe for FtrlParams<F, R>where
F: RefUnwindSafe,
R: RefUnwindSafe,
impl<F, R> Send for FtrlParams<F, R>where
R: Send,
impl<F, R> Sync for FtrlParams<F, R>where
R: Sync,
impl<F, R> Unpin for FtrlParams<F, R>where
R: Unpin,
impl<F, R> UnwindSafe for FtrlParams<F, R>where
F: UnwindSafe,
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more