ElasticNet Regression
Combines L1 (Lasso) and L2 (Ridge) regularization for best of both worlds
Combines L1 (Lasso) and L2 (Ridge) regularization for best of both worlds.
When to use:
- Have grouped correlated features
- Want some feature selection but not too aggressive
- More stable than pure Lasso
- Best all-around regularized linear model
Strengths: Balances feature selection and multicollinearity handling, more stable than Lasso, flexible Weaknesses: Two hyperparameters to tune (alpha and l1_ratio)
Model Parameters
Alpha (default: 1.0) Overall regularization strength.
L1 Ratio (default: 0.5) Mix of L1 and L2 penalties:
- 0: Pure Ridge (L2)
- 0.5: Equal mix (default)
- 1: Pure Lasso (L1)
Max Iterations (default: 1000) Maximum optimization iterations.
Fit Intercept (default: true) Whether to calculate intercept term.