[SciPy-dev] one more scipy.optimize.line_search question
Alan G Isaac
aisaac at american.edu
Mon Aug 6 17:03:24 EDT 2007
>> On Mon, 06 Aug 2007, dmitrey apparently wrote:
>>> I wonder what does the parameter amax=50 mean (in
>>> optimize.line_search func)? Seems like this parameter is
>>> never used in the func
> Alan G Isaac wrote:
>> Is there something wrong with the minpack2 documentation?
>> c stpmax is a double precision variable.
>> c On entry stpmax is a nonnegative upper bound for the step.
>> c On exit stpmax is unchanged.
On Mon, 06 Aug 2007, dmitrey apparently wrote:
> the line_search func from scipy.optimize has no any relation to the
> fortran routine you have mentioned.
> Maybe you mean line_search func from scipy.optimize.linesearch, but as I
> mentioned, scipy has 2 funcs line_search, one python-written (from
> optimize.py), other from /optimize/linesearch.py.
> So, as I have mentioned, amax is unused in scipy.optimize.linesearch
In optimize.linesearch we define:
line_search(f, myfprime, xk, pk, gfk, old_fval, old_old_fval, args=(), c1=1e-4, c2=0.9, amax=50):
In optimize.optimize we define:
line_search(f, myfprime, xk, pk, gfk, old_fval, old_old_fval, args=(), c1=1e-4, c2=0.9, amax=50):
Clearly this is just a matter of a consistent interface,
so all args get the same interpretation.
As to why the stepsize bound is not used in the latter,
you will have to ask Travis.
Do you find a difference in the performance of the two?
Cheers,
Alan Isaac
More information about the SciPy-Dev
mailing list