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

gibbon Neale.Gibson at astro.ox.ac.uk
Mon Jul 18 15:09:51 EDT 2011


Hi all

I'm looking some help in using fmin_cg to optimise a function. Basically I
provide a function and its gradient as follows;

> p1 = fmin_cg(func,p0,fprime=frime) 

and everything works fine. 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.

Is this possible? ie to use the inverse calculated in func in the frime
function as well?

Thanks for any help.
-- 
View this message in context: http://old.nabble.com/fmin_cg---using-the-same-inverse-calculation-in-func-and-fprime-tp32085615p32085615.html
Sent from the Scipy-User mailing list archive at Nabble.com.




More information about the SciPy-User mailing list