[SciPy-dev] scipy.optimize
Ed Schofield
schofield at ftw.at
Fri Apr 28 04:45:09 CDT 2006
Robert Cimrman wrote:
> Yes, fmin_l_bfgs_b uses a wrapped fortran module, so I can think only
> about rewriting its high-level logic (the main iteration loop?) in
> Python, using directly the fortran subroutines. But all functions in
> optimize.py could use the common interface without pain.
>
> The two main possibilities are:
> 1) call back each iteration (as I do in my fmin_sd) only
> 2) call back via wrap_function macro, so that function/gradient calls
> e.g. in line search functions are not missed - the callback could have
> one arg saying from where it was called, so that in postporcessing you
> could plot e.g. just the data from main loop iterations.
>
> Now as I have written them down, I would vote for 2) in some form.
>
Yes, (2) would be good :)
>> We'd also need to consider how to specify stopping criteria uniformly;
>> currently the functions use several different definitions of tolerance,
>> such as the mean or the norm of the gradient vector. It would be great
>> to unify these.
>>
>
> I will send you off-list how I have it for now.
>
It looks like a good start. I suggest you copy the whole scipy.optimize
package into the sandbox (e.g. as 'newoptimize') and check your code in
there...
-- Ed
More information about the Scipy-dev
mailing list