0

I have a big data set about 10,000 points of 3 independent variables. I am fitting with NonlinearModelFit command. After this, I specified 3 values for three variables to model fit and it gave me a value (say 0.18).

Now, I repeat the test by taking the coefficients separately and using them in the analytical function for which I found the same using the above command. But now I get different value like 21.0. I wonder how can it be? The coefficients I get using fit["BestFitParameters"] where fit is the function I defined while fittting. Any help is appreciated.

Writting the polynomial and its internal polynomial is difficult as they are lengthy having 450 terms or so.

corey979
  • 23,947
  • 7
  • 58
  • 101
george
  • 71
  • 4
  • 3
    Any code would be appreciated. – Henrik Schumacher Jun 12 '18 at 09:51
  • 3
    It's unclear what you're doing. Please post some minimal code that allows to reproduce the issue. Each time you fit to the same dataset you must get the same result. But then you're doing something (the second paragraph) that I can't understand. – corey979 Jun 12 '18 at 11:27
  • 2
    NonlinearModelFit will find a local optimum for the fit in your parameter space. There may be different local optima, and dependend on how you setup the problem, you may find different optima. – TimRias Jun 12 '18 at 12:11
  • By "450 terms" do you mean 450 parameters that are estimated? – JimB Jun 12 '18 at 15:05
  • Yes. 450 means there are 450 parameters to be found out. It is huge. I get two different answer from the one of model fit directly and from the explicitely rewritten model function using the estimated parameter obtained from nonlinear fit. This is the problem. – george Jun 12 '18 at 17:19

0 Answers0