# Multiple optima

Anyone knows the criterion for CVX to choose a solution from multiple optima? How can I change the criterion? For example when doing regression y=X*Beta + noise, X is row rank insufficient?

 cvx_begin quiet
variable Beta(d)
objfun=(X*Beta-y)'*(X*Beta-y);
minimize( objfun )
cvx_end

The criteria depends upon the particular solver, and in general there is no way for you to change it. From a strict mathematical standpoint, a modeler should have no expectation that a solver should prefer one optimum over another.

If you do have a preference of one solution over another, then you should modify your objective function to reflect that. For instance, you could select a relatively small value of \lambda and specify

cvx_begin quiet
variable Beta(d)
minimize(sum_square(X*beta-y)+lambda*norm(Beta))
cvx_end


which would prefer smaller values of \beta to larger ones. Alternatively, once you have determined the optimal value of the original problem, you could do something like this:

cvx_begin quiet
variable Beta(d)
minimize(norm(Beta))
sum_square(X*beta-y)<=1.01*optval
cvx_end


where optval is the optimal value of the original problem. Of course, you can adjust the 1.01 factor there as well, but it canâ€™t be less than 1.

The point is: if you have a preference, your model must reflect it.