pub struct LambdaPathOptions {
pub nlambda: usize,
pub lambda_min_ratio: Option<f64>,
pub alpha: f64,
pub eps_for_ridge: f64,
}Expand description
Options for generating a lambda path.
§Fields
nlambda- Number of lambda values (default: 100)lambda_min_ratio- Lambda minimum ratio (default: None, which auto-selects based on n vs p)alpha- Elastic net mixing parameter (0 = ridge, 1 = lasso)eps_for_ridge- Small alpha to use for computing lambda_max when alpha=0 (default: 0.001)
§Example
let opts = LambdaPathOptions {
nlambda: 50,
lambda_min_ratio: Some(0.01),
alpha: 0.5,
eps_for_ridge: 0.001,
};
assert_eq!(opts.nlambda, 50);
assert_eq!(opts.alpha, 0.5);Fields§
§nlambda: usizeNumber of lambda values to generate
lambda_min_ratio: Option<f64>Lambda minimum ratio. If None, auto-selects: 0.0001 if n >= p, else 0.01
alpha: f64Elastic net mixing parameter (0 = ridge, 1 = lasso)
eps_for_ridge: f64Small value to use for ridge regression max lambda calculation to avoid numerical issues (default: 1e-3)
Trait Implementations§
Source§impl Clone for LambdaPathOptions
impl Clone for LambdaPathOptions
Source§fn clone(&self) -> LambdaPathOptions
fn clone(&self) -> LambdaPathOptions
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 LambdaPathOptions
impl Debug for LambdaPathOptions
Auto Trait Implementations§
impl Freeze for LambdaPathOptions
impl RefUnwindSafe for LambdaPathOptions
impl Send for LambdaPathOptions
impl Sync for LambdaPathOptions
impl Unpin for LambdaPathOptions
impl UnwindSafe for LambdaPathOptions
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