[SciPy-user] Another leastsq Jacobian bug
Tue Jun 26 11:47:43 CDT 2007
No I didn't. The simplest refute to your answer is that your J is
-2*params*(xx*params-params^2). How could there be a term
with params's quadratic in the derivative if the original function
is a quadratic function?
On 6/25/07, Christian K <email@example.com> wrote:
> Lin Shao wrote:
> >>> ## Now define my Jacobian
> >>> def Jacobian(params,xx,yy,mode='col'):
> >>> J = N.empty((len(params),xx.size))
> >>> J = (xx-params)**2
> >>> J = -2*params*(xx-params)
> >> shouldn't that be -2*params*(xx-params)*params ?
> > I think I was right. Think about what's the derivative of -x^2 -- it's -2x
> you forgot about the chain rule .
> SciPy-user mailing list
More information about the SciPy-user