Minimize function of L2 and L1 vector's norm

34 Views Asked by At

Hei, guys. Recently I've got a task in my college. Minimize the following function: $$ f(x) = \|x-a\|_2^2+\lambda\|x\|_1 \tag{$*$} $$ with respect to $x.$ Suppose $x$ and $a$ are linear vectors, $\lambda$ is a scalar value. Solution should be analytical, so we can't use gradient descent. I've tried to make this: $$ (*)\iff f(x)=\sum_{i=1}^n(x^{(i)}-a^{(i)})^2 + \lambda\sum_{i=1}^n|x^{(i)}| $$ But it doesn't help. So, have you got any ideas?