How would you choose the L1/L2 mixing ratio in elastic net?
Last updated
Treat the mixing ratio (
l1_ratio) as a hyperparameter and tune it jointly with λ by cross-validation over a grid weighted toward 1 (e.g. 0.1 to 1), e.g. withElasticNetCV.Use priors to shape the grid: strong correlation or p ≫ n favors lower α (more L2). Needing a small, interpretable model favors high α. Break flat-CV ties toward the simpler or more stable model.
Standardize features and reuse the same folds across α values. Very small
l1_ratiovalues are numerically unreliable, so useRidgeinstead.