[SciPy-User] How to print the jacobian in the output of leastsq function

josef.pktd@gmai... josef.pktd@gmai...
Wed Aug 24 23:50:04 CDT 2011

On Thu, Aug 25, 2011 at 12:11 AM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
> On Tue, Aug 23, 2011 at 9:57 AM, Abraham Zamudio <abraham.zamudio@gmail.com>
> wrote:
>> Hi All,
>> i use  the leastsq function from module scipy ... but what I want now
>> is the jacobian matrix of the algorithm ... How should I use this
>> function to print the Jacobian ??? .
> That's tricky, as what is returned is the qr factorization of the Jacobian
> stored in condensed form containing the r part and what I think are the
> vectors of the Householder reflections that can be used to generate q. In
> addition, the columns are pivoted. So I think it would take a bit of
> research and work to recover the Jacobian. Perhaps someone here knows a bit
> more about the specific function used in this function. If you just want the
> covariance of the coefficients, that is easier to get, but note the
> documentation is incorrect, you need to multiply by the variance, not the
> standard deviation.

Is it even possible to recover the Jacobian from this?

I never found a way (but I'm not an expert). I gave up and just
calculate a numerical derivative at the solution.

Since this question shows up regularly it would also be good to have
an answer if it is a definite NO (or at least not with what the
underlying function returns).


> Chuck
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-User mailing list