Example: LassoThis example, from statistics, demonstrates the lasso procedure (-regularized least squares). For some more details, see Boyd and Vandenberghe, 6.3.2. Optimization problemWe wish to solve the optimization problem with parameters and optimization variable The problem is interesting both when , and when . CVXGEN codedimensions
m = 100 n = 10 end parameters A (m,n) b (m) lambda nonnegative # regularization weight. end variables x (n) end minimize (1/2)*quad(A*x - b) + lambda*norm_1(x) end |