June 26, 2007
3:33 a.m.
Lin Shao wrote:
## Now define my Jacobian def Jacobian(params,xx,yy,mode='col'): J = N.empty((len(params),xx.size)) J[0] = (xx-params[1])**2 J[1] = -2*params[0]*(xx-params[1]) shouldn't that be -2*params[0]*(xx-params[1])*params[1] ?
I think I was right. Think about what's the derivative of -x^2 -- it's -2x
you forgot about the chain rule . Christian