openopt / copt

A Python library for mathematical optimization
http://openo.pt/copt
Other
135 stars 35 forks source link

Fixed lmo_pairwise when the 0 vertex is chosen by the Away step #76

Closed GeoffNN closed 3 years ago

GeoffNN commented 3 years ago

An attempt to fix #75

fabianp commented 3 years ago

Could you add some tests for this so we don't break it again? thanks!

GeoffNN commented 3 years ago

Not entirely convinced myself -- still working on it.

This method is for the L1 ball, so it always includes the 0 point. The 0 "vertex" is needed because you can always write the iterate as a convex combo of 0 and the +/- e_i vectors. It is the one chosen by the away step when the negative gradient has the same signs coordinate wise as the iterate.

fabianp commented 3 years ago

I see, I missed that part. I'm fine with this solution as long as it has some tests then :-)

GeoffNN commented 3 years ago

The previous commit doesn't work as such: the iterate can go out of the constraint set.