pub struct ElasticNetParameters {
    pub alpha: f64,
    pub l1_ratio: f64,
    pub normalize: bool,
    pub tol: f64,
    pub max_iter: usize,
}Expand description
Elastic net parameters
Fields§
§alpha: f64Regularization parameter.
l1_ratio: f64The elastic net mixing parameter, with 0 <= l1_ratio <= 1. For l1_ratio = 0 the penalty is an L2 penalty. For l1_ratio = 1 it is an L1 penalty. For 0 < l1_ratio < 1, the penalty is a combination of L1 and L2.
normalize: boolIf True, the regressors X will be normalized before regression by subtracting the mean and dividing by the standard deviation.
tol: f64The tolerance for the optimization
max_iter: usizeThe maximum number of iterations
Implementations§
Source§impl ElasticNetParameters
 
impl ElasticNetParameters
Sourcepub fn with_alpha(self, alpha: f64) -> Self
 
pub fn with_alpha(self, alpha: f64) -> Self
Regularization parameter.
Sourcepub fn with_l1_ratio(self, l1_ratio: f64) -> Self
 
pub fn with_l1_ratio(self, l1_ratio: f64) -> Self
The elastic net mixing parameter, with 0 <= l1_ratio <= 1. For l1_ratio = 0 the penalty is an L2 penalty. For l1_ratio = 1 it is an L1 penalty. For 0 < l1_ratio < 1, the penalty is a combination of L1 and L2.
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 ElasticNetParameters
 
impl Clone for ElasticNetParameters
Source§fn clone(&self) -> ElasticNetParameters
 
fn clone(&self) -> ElasticNetParameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more