[SciPy-user] Questions about scipy.optimize.fmin_cobyla
Tue Jul 17 01:13:57 CDT 2007
Dominique Orban wrote:
>> This problem happens because while fmin_cobyla is able to handle
>> constraints, it nevertheless evaluates the objective function outside
>> those constraints. I think this is a very serious bug, which limits
>> the usefulness of fmin_cobyla. Unfortunately, I do not have a general
> This behavior of Cobyla is not a bug.
> There are two kinds of methods for constrained problems in optimization:
> feasible and infeasible methods. The iterates generated in a feasible method
> will all satisfy the constraints. In an infeasible method, they may or may not
> satisfy the constraints but, if convergence happens and if all goes well, the
> iterates converge to a point which is (approximately) feasible. Cobyla is an
> infeasible method.
> The fact that your objective function is not defined everywhere (because of
> log terms) suggests that you should not be using an infeasible method.
> you could look into feasible interior-point methods (beware, there also are
> infeasible interior-point methods... in fact, most of them are).
> NLPy features one such method, albeit a simple one, under the name TRIP (for
> 'trust-region interior-point method'). For those who care about this sort of
> thing, it is a purely primal method at the moment. I mostly implemented it
> proof of concept in the NLPy framework, and plan to upgrade it in the
> will not treat equality constraints, but the inequalities can be as
> you please, as long as they are twice differentiable. You can give it a try
> let me know what happens.
I couldn't find proper documents for TRIP method from NLPY. There are
only 3 small examples in the website of NLPY, and when I tried to get
the source code of NLPY:
$ svn co https://nlpy.svn.sourceforge.net/svnroot/nlpy/trunk/nlpy ./
svn: Can't convert string from native encoding to 'UTF-8':
svn: ?\208?\194?\189?\168 ?\206?\196?\177?\190?\206?\196?\181?\181.txt
I have tried to fix this problem, but with no success.
So could you point me some links that give a detailed explanation of how
to use TRIP?
> In addition to the constraints you already have, add new constraints stating
> that the arguments of the logs must be >= 0. Interior-point methods ensure
> at each iteration, those quantities remain > 0 (strictly).
> If the constraints you end up with are *only bound constraints*, you can also
> look into L-BFGS-B (which I believe is interfaced in SciPy), a projected
> quasi-Newton method, or TRON (www.mcs.anl.gov/~more/tron which I don't
> interfaced in SciPy), a projected Newton method. NLPy also contains a
> gradient-projection method which I find surprisingly efficient, but also only
> applies to bound constraints.
> Re-parametrizing your problem is, of course, another option.
> Good luck,
Thanks a lot.
More information about the SciPy-user