MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: LevenbergMarquardt

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86598] Re: LevenbergMarquardt
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Fri, 14 Mar 2008 04:18:34 -0500 (EST)

On 3/13/08 at 4:33 AM, ausman at okstate.edu (Ausman, Kevin) wrote:

>Here is what I am trying to do:

>result=FindMinimum[Sum[residFunc[xptData,testInstFunc,0,t,
>numRateConst,
>rateConst/.{kauto=AEk1float,icauto=AEic1float},numInitConc,ic/.{
>kauto=AEk
>1float,icauto=AEic1float},ec/.{kauto=AEk1float,icauto=AEic1float},
>rateEq,
>finalTime][[i]]^2,{i,1,Length[xptY]}],{{k1float,6000},{ic1float,0.
>003}},Method=AELevenbergMarquardt]

>The problem is that without specifying LevenbergMarquardt as the
>method I get an error that the gradient is effectively zero, but
>when I do specify Levenberg Marquardt it says that my function isn't
>of the appropriate form:

<snip>

>The parameters for residFunc are some experimental data and some
>fitting paramters (typically in lists), and it returns a
>one-dimensional list of numbers.

This last comment suggest you want to do a least squares fit of
data to a specified model. While it should be possible to do
this with FindMinimum, why not use FindFit? FindFit is
specifically designed to solve a least squares problem while
FindMinimum is a more general tool. As a general rule of thumb,
tools more specifically designed for a given problem in
Mathematica will outperform more general tools for that problem.

Like FindMinimum, the default method for FindFit is Automatic.
However, I believe FindFit tries Levenberg-Marquardt first with
this setting since that will generally produce better results
for a non-linear least squares problem.


  • Prev by Date: Re: NotebookClose
  • Next by Date: Re: NDSolve problem
  • Previous by thread: RE: Intermediate Evaluation in FindMinimum
  • Next by thread: RE: Re: LevenbergMarquardt