ML 4.9Lesson outlineLesson 9 of 9 in Module 4
Lasso and Elastic Net
Use an L1 penalty to drive some weights exactly to zero, and know when elastic net is the better choice.
Video in production.
Lesson outline: Lasso and Elastic Net
In this lesson12 parts
- 01A risk score with few inputs
- 02The diabetes study
- 03Least squares on sixty four columns
- 04The same linear model
- 05Weights and alpha
- 06Absolute values instead of squares
- 07One weight at a time
- 08The lasso path
- 09Choosing alpha
- 10Correlated features and instability
- 11Code
- 12Recap, your challenge, and what comes next
Builds on
This lesson stands on its own. These go deeper into what it uses.
- ML 4.8: Ridge Regression
- Maths 2.2 (the L1 and L2 unit balls); Maths 4.9 (²) is taken at Stage 8: Vector Arithmetic and Norms
- so the corner and soft thresholding are derived in the video (checked 2026-10-15)
Key terms: Lasso and Elastic Net
The words this lesson introduces, each in one line. The module’s glossary collects them all, and the AI glossary has every term across the courses.
- lasso
- Linear regression with a penalty on the absolute size of the weights.
- L1 penalty
- The sum of absolute weights.
- L1 norm (reminder, Maths 2.2)
- The sum of absolute values; its unit ball is a diamond.
- sparsity
- Many weights exactly zero.
- coordinate descent
- Minimizing over one weight at a time, with the others held fixed.
- soft thresholding
- Shrinking a value toward zero by α and setting it to zero when it is within α of zero.
- lasso path
- Every weight plotted as α decreases.
- elastic net
- A penalty mixing the L1 and L2 penalties.
- L1 ratio
- The share of the L1 penalty in that mix.
- selection instability
- A different sample choosing different features.
Quiz: Lasso and Elastic Net
Your first pick on each question is the one that counts. Getting one wrong here is how the lesson sticks.