Equivalent formulations for the first term: sum_square(A*x-b) and square_pos(norm(A*x-b)).
I am not sure whether there are any efficiency differences among these, but I wouldn’t worry about it. However …
If you didn’t have another term in the objective function, then the following would be equivalent in the sense of having the same argmin (other than roundoff and if there are multiple argmins). norm(A*x-b)
and is preferred in CVX for numerical reasons. See http://cvxr.com/cvx/doc/advanced.html#eliminating-quadratic-forms for a discussion of all this.
Of course, you could add a squared (or non-squared) regularizer term to norm(A*x-b) and that would be a different (non-equivalent), but possibly meritorious, regularization
I see from the link you provided that using norm is likely to produce more accurate results.
Like the example in the link, I wish to vary lambda to study the trade off between the residual and the regularizer.
To solve for x, I can keep my functions the same.
To study the trade off in varying lambda, I should reformulate my functions as follows
minimize ( (b - Ax)’(b - Ax) + lambda * x’ * x );
minimize ( norm(b - Ax) + lambda * x’ * x );
As you explained, these new objective functions are non-equivalent.
For a fixed lambda, the new objective functions will yield different values of x.
But when I vary lambda, they will produce the same trade off curve.