12-10-2015 04:46 PM
I found one disagreement between Numerical Recipes and LabVIEW help on covariance matrix definition in Nonlinear Curve Fit VI.
In Numerical Recipes, the covariance matrix C is the inverse of the curviture matrix Alpha and Alpha is defined as half of the Hessian matrix D. In Numerical Recipes, D is defined as the second derivative matrix of the chi^2 merit function, at any parameter. Therefore, C = 2 D^-1.
On the other hand, LabVIEW help gives an equation C = (1/2) D^-1. The definition of D is given by the help: "where D is the Hessian of the function with respect to its parameters". I feel the definition of D in LabVIEW is not quite clear. Can anyone clearify this factor of 4 difference on this covariance matrix definition?
John
12-11-2015 08:46 AM
Unless I'm missing something easy here. Let's look at the numerical recipes (whatever that is) version.
You say C = A^-1. You also say A = 1/2D. The definition of D isn't important. But, D = chi^2. (We'd assume this to be true in either case.)
Let's use simple substitution. We'll use the second equation to substitute for A in the first equation.
C = 1/2D^-1
How are you getting 2D? You've said you define A as half D.
12-15-2015 11:52 AM
hi natasftw,
A=1/2 D
so
C=A^-1 = (1/2 D)^-1 = 2 D^-1
But LabVIEW gives C = 1/2 D^-1
01-14-2016 02:37 PM
You are right, there is a problem in the LabVIEW documentation. It should read C=(0.5D)^-1
I have filed a request to fix this.
-Jim