Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: parameters problem in FindFit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92877] Re: parameters problem in FindFit
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Thu, 16 Oct 2008 05:06:30 -0400 (EDT)

On 10/15/08 at 5:37 AM, gyzhou at 139.com wrote:


>I get a list like this : lis = {{12.5, 1.146}, {32, 1.145}, {50,
>1.144}, {69, 1.1424}, {84.6, 1.139}}
>My aim is :

>FindFit[lis, a - (b x^2)/(c + x), {{a, 1.14}, {b, 0.0003}, {c,
>300}}, x]

>As we can see, I want this list to be fitted using parameters a, b,
>c around 1.14, 0.0003, 300. However Mathematica gives { b, 10^8} and
>{c,10^14} far from what I expect.I set "MaxIterations" to less times,
>but it doesn' t make sense.

Welcome to the world of non-linear fitting.

When you say the result doesn't make sense I assume you mean
from the perspective of some other knowledge about the data
being fitted by this model.

For large values of c your model approaches

a - d x^2 where d = b/c. And as you can see from

In[27]:= sol =
   FindFit[lis,
    a - (b x^2)/(c + x), {{a, 1.14}, {b, 0.0003}, {c, 300}}, x];
b/c /. sol

Out[28]= 9.47257*10^-7

In[29]:= FindFit[lis, a - (d x^2), {{a, 1.14}, {d, 0.0003}}, x]

Out[29]= {a->1.14624,d->9.47257*10^-7}

=46indFit is effectively fitting this reduced model to your data.

Plotting the data shows the result is nearly a linear function
of x. So, an alternative would be to do:

In[30]:= FindFit[lis,
  a - (b x^2)/(c + x), {{a, 1.14}, {b, 1}, {c, 0}}, x]

Out[30]= {a->1.14544,b->0.0000361511,c->-16.6034}

Doing non-linear fitting is inherently a difficult problem. In
your particular case, the difficulty is increased by the very
small variation in dependent variable and the fact the model
reduces to simpler models for some extreme values of the unknown parameters=


  • Prev by Date: RE: parameters problem in FindFit
  • Next by Date: Re: Re: naive question
  • Previous by thread: Re: parameters problem in FindFit
  • Next by thread: Re: parameters problem in FindFit