Performance of $\ell_1$ Regularization for Sparse Convex Optimization