MathGroup Archive 2005

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

Search the Archive


  • To: mathgroup at
  • Subject: [mg62540] FindFit
  • From: Montgrimpulo <dto_mba at>
  • Date: Sun, 27 Nov 2005 02:40:47 -0500 (EST)
  • Sender: owner-wri-mathgroup at



FindFit[t, f, {a, b, c}, {x}]

Out[] {a -> 0.969697, b -> 0.108392, c -> 0.0477855}

So far so good. Now, I want to use a different metric in FindFit.
However, I'm in doubt if my use of the option "NormFunction" in FindFit
is correct.

nf[x_] := Max[Abs[x]]

FindFit[t, f, {a, b, c}, {x}, NormFunction -> nf]

Out[] "The model a+b*x+c*x^2 is linear in the parameters {a, b, c}, but
a nonlinear method or non-Euclidean norm was specified, so nonlinear
methods will be used. "

Out[] The line search decreased the step size to within tolerance
specified by \AccuracyGoal and PrecisionGoal but was unable to find a
sufficient decrease \in the norm of the residual.  You may need more
than MachinePrecision digits \of working precision to meet these

Out []{a -> 0.988004, b -> 0.890595, c -> -0.0325868}

If I use NMinimize instead, I get with

d := t[[All, 2]] - Table[(f /. x -> t[[i, 1]]), {i, 1, Length[t]}] and


Out [] {2.42413, {a -> 0.470545, b -> 0.089553, c -> 0.0505806}}

as a result.

As the preparatory work to use FindFit is less than for NMinimize and
as NMinimize is slowes down drastically with increasing number of
points (also for NelderMead), I would like to get some hints to improve
the result from FindFit. Working with a higher MachinePrecision did not
lead to any improvements.



  • Prev by Date: Question concerning Beuwolf computing & Relativistic N-Body Problems
  • Next by Date: Re: SugarCube
  • Previous by thread: Question concerning Beuwolf computing & Relativistic N-Body Problems
  • Next by thread: Re: FindFit