Hi,
You'll have to go into the LMDIF routine upon which
vnl_levenberg_marquardt is built
and recover the Jacobian from in there. If you know FORTRAN this should
be fairly
easy, and if you don't, it might take a little time.
Do we have any FORTRAN speakers on the list?
A.
Original Message
From: vxlusersadmin@...
[mailto:vxlusersadmin@...] On Behalf Of Stanislaw
Szpala
Sent: 27 August 2003 21:18
To: vxlusers@...
Subject: [Vxlusers] Problems with estimating errors in
vnl_levenberg_marquardt
Hi,
I'm using vnl_levenberg_marquardt class to fit my data set (I supply no
gradients). I run the code from Microsoft Visual C++ 6.0; no MFC
classes, Windows2000. It works, but I need to get an estimate of the
errors of the fitted parameters. I believe the errors can be taken from
the diagonal elements of the covariance matrix. Unfortunately, I am
unable to get the covariance matrix using get_covariance(), see below.
...
vnl_vector<double> x0(3);
...
vnl_vector<double> x1 = x0;
vnl_levenberg_marquardt lm(fittedFunction);
lm.minimize_without_gradient(x1);
vnl_matrix<double> covar(3,3);
covar = lm.get_covariance();
('fitedFunction' is my class derived from 'vnl_least_squares_function',
and it defines the fitted function 'f')
When I try accesing get_JtJ(), I get "not implemented yet" message, see:
jacobian = lm.get_JtJ();
So it looks like it is not implemented. But the Jacobians must be
calculated at some point. So, how can I access the covariance matrix?
Thanks, Stan
Stanislaw Szpala, Ph.D.
Robarts Research Institute
100 Perth Drive
London Ontario N6A 5K8, Canada
tel (519)6635777x34213
sszpala@...
