What does these mean? like cvx_optval and cvx_slvtol

(蕭仰恩) #1

When we finish a code and run it,window will show us some information,like
cvx_cputime; cvx_optbnd; cvx_optval;
cvx_slvitr; cvx_slvtol; cvx_status

And as we know,when we are going to optimize something,there must be two thing in the code.objecting function(something we are going to maximize or minimize)
variable:take x in the Ax-b for example,A and b are maybe some random variable,but x is variable,we have to calculate it.

I want to ask what does that information mean?which one means x,which means the objecting function value?

(Mark L. Stone) #2

You would benefit by re-reading the CVX Users’ Guide.


When Matlab reaches the cvx_end command, the least-squares problem is solved, and the Matlab variable x is overwritten with the solution of the least-squares problem, i.e., (ATA)−1ATb. Now x is an ordinary length-n numerical vector, identical to what would be obtained in the traditional approach, at least to within the accuracy of the solver. In addition, several additional Matlab variables are created; for instance,

  • *cvx_optval contains the value of the objective function`;
  • cvx_status contains a string describing the status of the calculation (see Interpreting the results ).

Also see http://cvxr.com/cvx/doc/solver.html#interpreting


Numerical methods for convex optimization are not exact; they compute their results to within a predefined numerical precision or tolerance. Upon solution of your model, the tolerance level the solver has achieved is returned in the cvx_slvtol variable. Attempts to interpret this tolerance level in any absolute sense are not recommended.