pub struct LassoParameters {
pub alpha: f64,
pub normalize: bool,
pub tol: f64,
pub max_iter: usize,
}
Expand description
Lasso regression parameters
Fields§
§alpha: f64
Controls the strength of the penalty to the loss function.
normalize: bool
If true the regressors X will be normalized before regression by subtracting the mean and dividing by the standard deviation.
tol: f64
The tolerance for the optimization
max_iter: usize
The maximum number of iterations
Implementations§
Source§impl LassoParameters
impl LassoParameters
Sourcepub fn with_alpha(self, alpha: f64) -> Self
pub fn with_alpha(self, alpha: f64) -> Self
Regularization parameter.
Sourcepub fn with_normalize(self, normalize: bool) -> Self
pub fn with_normalize(self, normalize: bool) -> Self
If True, the regressors X will be normalized before regression by subtracting the mean and dividing by the standard deviation.
Sourcepub fn with_max_iter(self, max_iter: usize) -> Self
pub fn with_max_iter(self, max_iter: usize) -> Self
The maximum number of iterations
Trait Implementations§
Source§impl Clone for LassoParameters
impl Clone for LassoParameters
Source§fn clone(&self) -> LassoParameters
fn clone(&self) -> LassoParameters
Returns a copy 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 Debug for LassoParameters
impl Debug for LassoParameters
Source§impl Default for LassoParameters
impl Default for LassoParameters
Source§impl<TX: FloatNumber + RealNumber, TY: Number, X: Array2<TX>, Y: Array1<TY>> SupervisedEstimator<X, Y, LassoParameters> for Lasso<TX, TY, X, Y>
impl<TX: FloatNumber + RealNumber, TY: Number, X: Array2<TX>, Y: Array1<TY>> SupervisedEstimator<X, Y, LassoParameters> for Lasso<TX, TY, X, Y>
Auto Trait Implementations§
impl Freeze for LassoParameters
impl RefUnwindSafe for LassoParameters
impl Send for LassoParameters
impl Sync for LassoParameters
impl Unpin for LassoParameters
impl UnwindSafe for LassoParameters
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