I am using scipy.optimize.minimize
to find the optimum value from a function. Here is the simplest example, using the built-in Rosenbrock function:
>>> from scipy.optimize import minimize, rosen
>>> x0 = [1.3, 0.7, 0.8, 1.9, 1.2]
>>> # Minimize returns a scipy.optimize.OptimizeResult object...
>>> res = minimize(rosen, x0, method='Nelder-Mead')
>>> print res
status: 0
nfev: 243
success: True
fun: 6.6174817088845322e-05
x: array([ 0.99910115, 0.99820923, 0.99646346, 0.99297555, 0.98600385])
message: 'Optimization terminated successfully.'
nit: 141
x
is just the final, optimum input vector. Can I get a list for all iterations (i.e. an objective function with corresponding input vector) from the returned scipy.optimize.OptimizeResult
object?