# Why does Lasso Regression only eliminate some features [duplicate]

How does Lasso Regression select which coefficients to set to 0 and why are not all of them set to zero? My understanding is minimizing the function:

$$min_{\beta} \lvert\lvert y-X\beta\rvert\rvert^{2}_{2} + \lambda \sum_i \lvert\beta_i\rvert$$

It seems to me that minimizing this function would be setting all coefficients to 0 eliminating the normalizing factor. How does lasso resolve to minimizing this function by only setting select coefficients to 0?

• But then your $X\beta$ is a terrible prediction of $y$, and the other term is large. // Your notation is obvious to me, but I already know what LASSO means. If I didn’t know better, I would think you wanted to take the argmin of that norm and then add $\lambda\Sigma$, which is totally wrong but kind of what you wrote.
– Dave
Commented Jul 24, 2021 at 4:15
• Yeah thank you I do understand that but how exactly does lasso find this balance and why does it result in only select coefficients going to 0? Commented Jul 24, 2021 at 4:18