# Speeding up Lasso For Multiple Runs

#1

Hi,

I’m using Lasso to solve a linear problem, but as the data size is quite large it’s taking a relatively long time. (code below)
I’m using SDPT3, and I get no output to the command window for ~15 minutes before the solver appears to kick-in. At this point the solver runs in about half a minute, and I get an answer.

Is there a way to speed this up? Or if I want to test the reconstruction for different values of lambda, or a different signal, is there a way to speed this up?

I’m using the following for the linear problem s = Ax.
s is an (m by 1) signal.
x is our desired image indices (n by 1).
A is a highly sparse measurement matrix (n by m).
lambda is the regularisation parameter.
Is there a way to speed this up if I want to test multiple values of lambda, and multiple values of s?

``````_cvx_begin_
``````

_ variable x(n)_
_ minimize( norm((A’ x-s),2) + lambdanorm(x,1) )_
_ cvx_end_

## The output is as follows: Calling SDPT3 4.0: 464302 variables, 1579 equality constraints

num. of constraints = 1579
dim. of socp var = 464302, num. of socp blk = 231362

SDPT3: Infeasible path-following algorithms

## number of iterations = 22 primal objective value = 3.58671535e+06 dual objective value = 3.58671534e+06 gap := trace(XZ) = 1.30e-02 relative gap = 1.81e-09 actual relative gap = 1.80e-09 rel. primal infeas (scaled problem) = 1.87e-13 rel. dual " " " = 6.68e-11 rel. primal infeas (unscaled problem) = 0.00e+00 rel. dual " " " = 0.00e+00 norm(X), norm(y), norm(Z) = 5.0e+06, 1.0e+00, 1.2e+02 norm(A), norm(b), norm© = 1.2e+03, 3.6e+06, 1.2e+02 Total CPU time (secs) = 23.61 CPU time per iteration = 1.07 termination code = 0 DIMACS: 2.0e-13 0.0e+00 4.0e-09 0.0e+00 1.8e-09 1.8e-09

Status: Solved
Optimal value (cvx_optval): +3.58672e+06

(Mark L. Stone) #2

There is no speed up available in CVX for multiple problems of he same form.

However, that can be done in YALMIP using `optimizer` https://yalmip.github.io/command/optimizer/. If you have questions how to do that, you can ask at https://groups.google.com/forum/?fromgroups#!forum/yalmip