The elastic net minimises . How do you show that it is a lasso problem on augmented data, and what does this imply for the number of variables it can select and for correlated features?
Supervised learning, Elastic net
Level L3 Intermediate. Length Long. Nature Mat Mathematical.
What's being asked
A neat reduction: the ridge part is absorbed by adding pseudo-observations, giving a lasso with rows.
Key idea
Let and , . Then when .
Steps
- Stack the data: (size ), , and define , so .
- Then , which equals the squared-error part plus the ridge part.
- The L1 term is . Choosing makes it equal to . So elastic net on is exactly lasso on .
- Number of variables: a lasso on rows picks at most non-zero coefficients. The augmented matrix has rows and full column rank for any , so the elastic net can select up to variables, even when .
- Correlated features: for two nearly identical columns, lasso tends to pick one at random. The ridge term is strictly convex, so the solution is unique, and equal-looking columns receive nearly equal coefficients (the grouping effect).
- Rule of thumb: use the elastic net when features come in correlated groups, or when and you expect many relevant features.
Common mistakes
- Forgetting to scale: without the strength and the coefficients do not match the original problem.
- Saying the elastic net gives the same answer as lasso then ridge in sequence. The penalty is joint.
- Claiming it removes the need to choose . It has two parameters to tune.
How long your answer should be
One page; 6–8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Supervised learning: Fit the points with (a) a quadratic and (b) a straight line. Find each fit and its residual sum of squares. Why is the quadratic exact, and what goes wrong if you try a cubic?
Next in Supervised learning: Show that ridge regression is the MAP (maximum a posteriori) estimate under a Gaussian prior, and lasso under a Laplace prior, when the noise is Gaussian. If the noise variance is and the prior is with , what ridge does this give?