pub struct LassoFitOptions {
pub lambda: f64,
pub intercept: bool,
pub standardize: bool,
pub max_iter: usize,
pub tol: f64,
pub penalty_factor: Option<Vec<f64>>,
pub warm_start: Option<Vec<f64>>,
pub weights: Option<Vec<f64>>,
}Expand description
Options for lasso regression fitting.
Configuration options for lasso regression (L1-regularized linear regression).
§Fields
lambda- Regularization strength (≥ 0, higher = more sparsity)intercept- Whether to include an intercept termstandardize- Whether to standardize predictors to unit variancemax_iter- Maximum coordinate descent iterationstol- Convergence tolerance on coefficient changespenalty_factor- Optional per-feature penalty multiplierswarm_start- Optional initial coefficient values for warm startsweights- Optional observation weights
§Example
let options = LassoFitOptions {
lambda: 0.1,
intercept: true,
standardize: true,
..Default::default()
};Fields§
§lambda: f64§intercept: bool§standardize: bool§max_iter: usize§tol: f64§penalty_factor: Option<Vec<f64>>§warm_start: Option<Vec<f64>>§weights: Option<Vec<f64>>Trait Implementations§
Source§impl Clone for LassoFitOptions
impl Clone for LassoFitOptions
Source§fn clone(&self) -> LassoFitOptions
fn clone(&self) -> LassoFitOptions
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 Debug for LassoFitOptions
impl Debug for LassoFitOptions
Auto Trait Implementations§
impl Freeze for LassoFitOptions
impl RefUnwindSafe for LassoFitOptions
impl Send for LassoFitOptions
impl Sync for LassoFitOptions
impl Unpin for LassoFitOptions
impl UnwindSafe for LassoFitOptions
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