View Single Post
Old 08-26-2012, 05:21 PM
tzs29970 tzs29970 is offline
Invited Guest
Join Date: Apr 2012
Posts: 52
Default Re: quadrat prog CVXOPT Python

It's similar to floating point in general. If you have some computed number whose exact value should be x, the floating point number you actually get is not necessarily exactly x but rather is in some interval (x-\epsilon,x+\epsilon) for some (hopefully) small \epsilon.

Thus, when you are looking for a 0, you should consider anything close to 0 to be 0. The question then is how close is close enough? To deal with that, I printed out the \alpha's from a few runs, and eyeballed them to get an idea of what a good \epsilon might be. That was good enough to get all of the problems right.

Alternatively, one of the items in the dictionary gp returns is named 'gap'. I do not understand CVXOPT well enough yet to be quite sure what the gap is, but it seems to be a good candidate for \epsilon.
Reply With Quote