LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Covariance matrix and Hessian matrix

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

0 Kudos
Message 1 of 4
(4,775 Views)

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. 

0 Kudos
Message 2 of 4
(4,744 Views)

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

0 Kudos
Message 3 of 4
(4,696 Views)

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

0 Kudos
Message 4 of 4
(4,579 Views)