forum.alglib.net

ALGLIB forum
It is currently Sat Apr 20, 2024 1:54 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to get covariance matrix (parameter errors) after LSFIT?
PostPosted: Wed Nov 10, 2010 5:10 pm 
Offline

Joined: Wed Nov 10, 2010 2:56 pm
Posts: 1
In classical Levenberg-Marquardt implementations the final step is to get covariance matrix of the standard errors in the fitted parameters. As far as I understand, this is not implemented in ALGLIB's LSFIT.

In "Numerical Receipts" the covariance matrix called "covar" and is part of the iteration procedure (see Chapter 15.5 for code and comments).
But I can't figure out where's the "covar" is in your LSFitNonlinearIteration. Basically, I need it to get the standard errors of fitting parameters. Does anybody have ideas on this?


Top
 Profile  
 
 Post subject: Re: How to get covariance matrix (parameter errors) after LS
PostPosted: Wed Nov 10, 2010 7:36 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 906
As of version 3.1, ALGLIB does not support this feature. It is planned to be implemented in ALGLIB 3.2 (will be released at the end of the month) along with bound constraints on parameters being fitted.

Meanwhile you can calculate it manually using quadratic model built by algorithm. LSFitState structure has OptState field (it may be hidden behind proxy object ptr or obj in version for your programming language). OptState has QuadraticModel field, which contains 2*transpose(J)*J (if you use Jacobian-based or Jacobian-free fitting). In Hessian-based mode this field contains Hessian. It is symmetric matrix with both upper and lower triangles.

You may need to make some tweaks in ALGLIB code to make this field accessible (adding one or more "public" statements, depending on your programming language).


Top
 Profile  
 
 Post subject: Re: How to get covariance matrix (parameter errors) after LS
PostPosted: Thu Jun 28, 2012 6:15 pm 
Offline

Joined: Thu Jun 28, 2012 6:13 pm
Posts: 1
Has this been implemented? I am not able to find it in the latest version. Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 66 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group