How to choose a proper $\lambda$ for LASSO or BPDN problem?

42 Views Asked by At

When I deal with the compressed sensing problem, which can be written as: $min |x|_0 \;\; s.t. \|Ax-y\|^2\le\epsilon$. And there are some way to solve the problem, such as relaxing it as $min \;\lambda|x|_1 + 0.5\|Ax-y\|^2$, which is also referred to LASSO problem.

My problem is that how to choose $\lambda$? I know that bigger $\lambda$ results in more sparse solution. However, actually I don't know the number of non-zero elements in $x$ and how can I choose the correct $\lambda$ for better performance? For example, $\lambda=1$ results in ten non-zero elements, while $\lambda=20$ results in one, and how can I know which is better?