From: Patrick Alken <patrick.alken@Colorado.EDU> To: "gsl-discuss@sourceware.org" <gsl-discuss@sourceware.org> Subject: Changes in nonlinear least squares module Date: Wed, 26 Feb 2014 22:44:00 -0000 [thread overview] Message-ID: <530E6E34.1050102@colorado.edu> (raw) Hello all, I've been working a lot on the nonlinear least squares module lately, and wanted to inform everyone of some changes. 1) There is a brand new Levenberg-Marquardt solver called 'lmniel' based on a smoother updating procedure for the damping parameter proposed by Nielsen 1999. This is the algorithm implemented in the popular 'levmar' library. This algorithm is not as robust as the current 'lmsder' algorithm, since it does not use a trust region approach and has a simpler method of rescaling to deal with badly scaled problems. However there are two significant advantages in lmniel: a) The algorithm is much simpler than the lmsder/MINPACK algorithm and will be very easy to maintain going forward. Despite its simplicity, it has proven very effective on a large class of problems. b) The most important reason I wanted to include this is that in each iteration, the method solves the normal equation system: (J^T J + \mu I) dx = -J^T f and so it does a QR decomposition of the p-by-p matrix J^T J instead of the full n-by-p matrix J, which lmsder operates on. This means that for problems with a huge number of residuals (ie: n >> p), the method is far more efficient than lmsder, which can sit there for hours trying to QR decompose the n-by-p Jacobian which could have millions of rows. The drawback of this approach is that the normal equations solution could be significantly error-prone if the Jacobian matrix is near-singular, since forming J^T J would make the matrix much closer to singular. In these cases lmsder would be preferable. In principle, lmsder could be modified to solve the normal equations also, however the lmsder algorithm is rather complex and I haven't taken the time to fully understand it. And of course for smaller systems where efficiency is not a big concern lmsder is more accurate and will converge more quickly in many cases. 2) There is now direct support for weighted nonlinear least squares, via the _wset functions. Previously, the user had to take care of weighting themselves in their f and df evaluation functions. 3) There is a new interface fdfridge for adding ridge regularization to nonlinear least squares problems. 4) There is now an extensive test suite for the nonlinear least squares module. Previously there existed 3 tests and now there are around 40. These tests helped to identify a bug in the scaling procedure of lmsder, and they also demonstrate that lmsder is an extremely robust implementation. There were some questions about this on the mailing list and bug tracker (ie: switching to the ALGLIB or levmar algorithms). Levmar is now implemented as the lmniel solver for big systems, but I can't find any reason to doubt the quality of the lmsder solver; it converges on many of the test suite problems which levmar/lmniel cannot. Patrick

reply other threads:[~2014-02-26 22:44 UTC|newest]Thread overview:[no followups] expand[flat|nested] mbox.gz Atom feed

Be sure your reply has aReply instructions:You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the--to,--cc, and--in-reply-toswitches of git-send-email(1): git send-email \ --in-reply-to=530E6E34.1050102@colorado.edu \ --to=patrick.alken@colorado.edu \ --cc=gsl-discuss@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting theIn-Reply-Toheader via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).