[SciPy-User] Flaws in fmin_cobyla
Moore, Eric (NIH/NIDDK) [F]
Thu Sep 27 15:14:40 CDT 2012
> -----Original Message-----
> From: Robaula [mailto:firstname.lastname@example.org]
> Sent: Thursday, September 27, 2012 3:48 PM
> To: email@example.com
> Subject: Re: [SciPy-User] SciPy-User Digest, Vol 109, Issue 66
> Denis Laxalde writes:
> > So what's wrong? Am I missing something?
> I think so. I think you're missing line 165 of the fmin_cobyla routine.
> > This is what the optimize tutorial  is for, I guess.
> > 1: http://docs.scipy.org/doc/scipy/reference/tutorial/optimize.html
> Inadequate and IMHO, useless. Also, doesn't mention fmin_cobyla,
> cobyla, or COBYLA.
> Bob H
> SciPy-User mailing list
The various data produced by fmin_cobyla routine are printed using a direct call to PRINT from within the fortran routine. This is less than optimal because if you are not running in a terminal (ie, at python, or ipython) you won't see any of the output.
So try executing the example or changing the disp parameter while running from the console, and they will work as expected.
I'd say this is a big gotcha that should be noted in the docs at least. The better choice would really be to patch cobyla2.f so that this would work even in the ipython qtconsole or wherever Bob is running his code.
If there really is something to line 165 (https://github.com/scipy/scipy/blob/master/scipy/optimize/cobyla.py#L165) it's not obvious to me. Could you elaborate?
More information about the SciPy-User