[SciPy-User] Access to objective function and gradient in minimize callback

Mark vdw markvanderw at gmail.com
Wed Nov 18 09:06:07 EST 2015


Hi all,

I want to keep track of the optimisation history when using minimize. I
want to keep track of the objective function value and the gradient.
However, the callback function is only given the current parameters, not
the actual value of the objective function and its gradient. So whenever I
want to store the current fval and gradient, I have to recompute them in
the callback, which is wasteful, especially in the case where I want to
store the values at every iteration.

Is there a way to get the fval and gradient that have already been computed
inside the optimiser to the callback function?

Many thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20151118/9f2bae27/attachment.html>


More information about the SciPy-User mailing list