A team is regularizing a linear model with five features. The features happen to be orthonormal — mutually perpendicular, each of length 1 — and for that special case both standard regularizers have an exact closed form, so no iterative solver is needed.
Write for the unpenalized (ordinary least squares) coefficient of feature . Then for penalty strength :
Ridge, which penalizes :
Lasso, which penalizes :
The five OLS coefficients are:
| Feature | |
|---|---|
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 |
The team is not given . Instead they have a sparsity budget: the deployed model must keep exactly two non-zero coefficients, and they use the smallest whole number for which the lasso solution achieves that. The very same is then plugged into the ridge formula, so that the two methods can be compared fairly.
How far apart are the two resulting weight vectors? Compute the Euclidean distance between them:
Give your answer rounded to two decimal places — for example 1.23.