Classical Machine Learning
Which coefficient can disappear?
Two coefficients fall inside the penalty
Small fitted coefficients may not survive a lasso penalty. Botie's simplified orthonormal example makes the shrinkage and its zero boundary visible.
BOTIE
The inputs we are comparing
Unpenalised coefficients
Example 1
- 02
- 10.5
- 2-3
Example 2
- 00.2
- 1-0.5
- 24
Penalty
Same in both cases
1
Result for example 1
- 01
- 10
- 2-2
For a list use brackets, such as [2, 4]. For a matrix put each row in brackets. Text answers can stay as text.
Coefficients exactly at the threshold
This check uses the pieces from “Shrink magnitudes, stop at zero, restore signs”.
BOTIE
- Unpenalised coefficients
- 0-2
- 12
- 20.5
- 30
- Penalty
2
Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
What would go wrong if you subtracted the penalty directly from signed coefficients, and why is this formula restricted to the stated geometry?
A penalty's effect depends on both its form and the optimisation problem; this closed-form lasso rule is a special case.
This is a small construction problem. The lesson explains the assumptions and the parts of the full method that this example leaves out.
Work through the Python challenges →