[SciPy-Dev] improvements of optimize package

Denis Laxalde denis.laxalde@mcgill...
Mon Sep 19 08:14:20 CDT 2011


Christoph Deil wrote:
> - Why not have all optimizers return only two things, x and infodict?
> The difference to your proposal would be that "ier" and "mesg" as
> well as solver-dependent extra stuff would all be in infodict instead
> of having variable-length return tuples, which make it harder to
> quickly switch optimizers. If it's just a dict I can simply pprint it
> and as long as I don't look at items that are not available for all
> solvers, I only have to change one word in the code (the optimizer
> name) to switch to any other optimizer.
> - Can we call the unified minimizer simply "minimize" instead of
> "fminunc", which is kind of hard to pronounce?
> - Why not call the (optional) returned function, Jacobian and Hessian
> "fun", "jac" and "hess". This is easier to remember than the f, g, h
> you propose, because it is the same names as for the inputs.
> - constrained minimizers could be "con_minimize" instead of
> "fmincon". Also: you call the parameters "cons" (e.g. "eq_cons"), but
> the  minimizer "con". Pick one or the other.
> - Scalar function minimizers could be "minimize1d" instead of
> "fmins", similar to "interp1d" and other 1d specific stuff in scipy.

Thanks for these comments, I'll update the proposal accordingly.

> - I would avoid renaming fmin to something else, because it is so
> much in use. You could simply choose a new name for the root finding
> wrapper, e.g. "root".

You mean 'fsolve' here I guess? "root" is a good name.

-- 
Denis


More information about the SciPy-Dev mailing list