[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: LMFIT -- stay away from it!*From*: Wayne Landsman <landsman(at)mpb.gsfc.nasa.gov>*Date*: Sat, 31 Jan 1998 19:48:07 -0500*Newsgroups*: comp.lang.idl-pvwave*Organization*: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:10001

A while back I posted a complaint about LMFIT, the IDL implemention of the Numerical Recipes version of the Levenberg-Marquardt non-linear least-squares algorithm. I complained that the form of the user-supplied function was different and less flexible than that of CURVEFIT. In fact, there is a more fundamental problem with LMFIT. Although the documentation says that the user-supplied function should accept a vector argument, **only scalar arguments are ever passed to the user-supplied function**! Thus, if one is fitting a function of 2000 points, then there must be 2000 calls to the user-supplied function on each iteration. And thus with a computationally intensive function, LMFIT will be about 2000 times slower than fitting with CURVEFIT. The same problem occurs in the IDL implementation of the Numerical Recipes routines QSIMP. But the problem is more disatrous in LMFIT, which requires more iterations and partial derivative computations. My advice -- forget about LMFIT, and stick with CURVEFIT (or write your own implementation of the Numerical Recipes routine). --Wayne Landsman landsman@mpb.gsfc.nasa.gov

- Prev by Date:
**Re: how to grab !X.TICKS from previously drawn plot?** - Next by Date:
**Re: Q: debuggging widget applications in IDL 5** - Prev by thread:
**Re: how to grab !X.TICKS from previously drawn plot?** - Next by thread:
**Re: Q: debuggging widget applications in IDL 5** - Index(es):