[SciPy-User] Flaws in fmin_cobyla

Moore, Eric (NIH/NIDDK) [F] eric.moore2@nih....
Thu Sep 27 15:14:40 CDT 2012

> -----Original Message-----
> From: Robaula [mailto:helmrp@yahoo.com]
> Sent: Thursday, September 27, 2012 3:48 PM
> To: scipy-user@scipy.org
> Subject: Re: [SciPy-User] SciPy-User Digest, Vol 109, Issue 66
> Denis Laxalde writes:
> ...snip...
> > 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 [1] 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
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

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 mailing list