Struct smartcore::linear::lasso::LassoParameters
source · 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 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