# Solved – Intuition for the degrees of freedom of the LASSO

Zou et al. "On the "degrees of freedom" of the lasso" (2007) show that the number of nonzero coefficients is an unbiased and consistent estimate for the degrees of freedom of the lasso.

It seems a little counterintuitive to me.

• Suppose we have a regression model (where the variables are zero mean)

\$\$y=beta x + varepsilon.\$\$

• Suppose an unrestricted OLS estimate of \$beta\$ is \$hatbeta_{OLS}=0.5\$. It could roughly coincide with a LASSO estimate of \$beta\$ for a very low penalty intensity.
• Suppose further that a LASSO estimate for a particular penalty intensity \$lambda^*\$ is \$hatbeta_{LASSO,lambda^*}=0.4\$. For example, \$lambda^*\$ could be the "optimal" \$lambda\$ for the data set at hand found using cross validation.
• If I understand correctly, in both cases the degrees of freedom is 1 as both times there is one nonzero regression coefficient.

Question:

• How come the degrees of freedom in both cases are the same even though \$hatbeta_{LASSO,lambda^*}=0.4\$ suggests less "freedom" in fitting than \$hatbeta_{OLS}=0.5\$?

References:

Contents