For ridge regression, define the effective degrees of freedom and express it with the singular values of . If has singular values and , what are and the shrinkage factor on each direction?
Supervised learning, Ridge regression
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can use the SVD to see ridge as shrinking each principal direction by .
Key idea
With , . Directions with large are barely shrunk, while directions with small are shrunk heavily.
Steps
- Write the SVD , with orthonormal , and diagonal of singular values .
- Substituting, the ridge fitted values are . So the component of along is multiplied by .
- The trace of the smoother matrix adds these factors: . At it is (here 3), and it tends to 0 as .
- Numbers with and : factors are , , .
- So , fewer than the 3 parameters.
- Interpretation: ridge keeps the high-variance (large ) directions almost fully and suppresses the directions that the data barely inform, which is why it controls variance.
Common mistakes
- Using instead of . The squares come from .
- Saying ridge sets directions to exactly zero. It shrinks smoothly.
- Counting df as regardless of .
How long your answer should be
Half a page, 5 minutes.
Last checked on 4 December 2026.
Read this
Previous in Supervised learning: How do you derive the log-likelihood, the gradient and the Hessian of binary logistic regression, show that the log-likelihood is concave, and carry out one Newton step from on the data , (one feature, no intercept)?
Next in Supervised learning: Assume with , and of full column rank . How do you prove that , so that is unbiased?