pub struct Ftrl<F: Float> { /* private fields */ }Implementations§
Source§impl<F: Float> Ftrl<F>
View the fitted parameters and make predictions with a fitted
follow the regularized leader -proximal, model
impl<F: Float> Ftrl<F>
View the fitted parameters and make predictions with a fitted follow the regularized leader -proximal, model
Sourcepub fn get_weights(&self) -> Array1<F>
pub fn get_weights(&self) -> Array1<F>
Calculate weights for model prediction
Sourcepub fn update<D: Data<Elem = F>, T: AsSingleTargets<Elem = bool>>(
&mut self,
dataset: &DatasetBase<ArrayBase<D, Ix2>, T>,
probabilities: ArrayView1<'_, Pr>,
)
pub fn update<D: Data<Elem = F>, T: AsSingleTargets<Elem = bool>>( &mut self, dataset: &DatasetBase<ArrayBase<D, Ix2>, T>, probabilities: ArrayView1<'_, Pr>, )
Update method of the model hyperparameters in case of async mode. To use this method, we must store probabilities and features for the row, and update once the result (bool) is observed.
Source§impl<F: Float> Ftrl<F>
impl<F: Float> Ftrl<F>
Sourcepub fn params() -> FtrlParams<F, Xoshiro256Plus>
pub fn params() -> FtrlParams<F, Xoshiro256Plus>
Create a default parameter set for construction of Follow The Regularized Leader - proximal model The description can be found here
It requires data preprocessing done in the separate step.
Create default hyperparameters. Random number generator will default to rand_xoshiro::Xoshiro256Plus
Sourcepub fn params_with_rng<R: Rng>(rng: R) -> FtrlParams<F, R>
pub fn params_with_rng<R: Rng>(rng: R) -> FtrlParams<F, R>
Create default hyperparameters with custom random number generator
Trait Implementations§
Source§impl<F: Float, D: Data<Elem = F>> PredictInplace<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<Pr>, Dim<[usize; 1]>>> for Ftrl<F>
impl<F: Float, D: Data<Elem = F>> PredictInplace<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<Pr>, Dim<[usize; 1]>>> for Ftrl<F>
Auto Trait Implementations§
impl<F> Freeze for Ftrl<F>where
F: Freeze,
impl<F> RefUnwindSafe for Ftrl<F>where
F: RefUnwindSafe,
impl<F> Send for Ftrl<F>
impl<F> Sync for Ftrl<F>
impl<F> Unpin for Ftrl<F>
impl<F> UnwindSafe for Ftrl<F>where
F: UnwindSafe + RefUnwindSafe,
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