[SciPy-User] [SciPy-user] fmin_cg - using the same inverse calculation in func and fprime

Jason Rennie jrennie at gmail.com
Tue Jul 19 08:20:22 EDT 2011


On Mon, Jul 18, 2011 at 3:09 PM, gibbon <Neale.Gibson at astro.ox.ac.uk> wrote:

> However, both func and fprime require the same matrix inversion at each
> step (via cholesky factorization). As matrix
> inversion is expensive, ideally I would like to calculate it only once
> per step, and use the matrix inverse calculated by func in the fprime
> function without having to repeat the calculation.
>

Try fmin_l_bfgs_b or fmin_tnc which allow 'func' to return both function
value and gradient (if fprime=None).  Though these functions allow you to
specify simple bounds, they work well for unbounded problems in my
experience.

http://docs.scipy.org/doc/scipy/reference/optimize.html

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110719/68f315e6/attachment.html>


More information about the SciPy-User mailing list