[SciPy-user] Getting started with optimize.fmin_l_bfgs_b
ckkart at hoc.net
Wed Jun 29 07:17:13 CDT 2005
Nils Wagner wrote:
>> You could collect the values of x at each call of 'func' in a global
>> list and plot them later.
> Please can you send me an example how to realize this task in my case.
> Thanks in advance.
from scipy import *
data = 
data.append(x*1) # to force a copy
return x-x, array(([1.0,-1.0]))
guess = 1.2, 1.3
bounds = [(-2.0,2.0), (-2.0,2.0) ]
best, val, d = optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1)
print 'Position of the minimum',best, 'and its value',val
data = transpose(data)
More information about the SciPy-user