The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Best nonlinear fitting - New algorithm required
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cc261

22 Posts

Posted - 01/04/2016 :  09:46:00 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Know the fitting function and the data as followings, what is the best set of parameters fitting to the function?

Function: y=c1*(1-erf(x/2*sqrt(c2*360))*x^c3)+exp(c4*x)*c5
Parameters: c1, c2, c, c4, c5
Data:
x=2,4,6,8,10,15,20,25;
y=1.182565143,1.083728032,0.957354939,0.900731898,0.89427394,0.860185818,0.848599577,0.654274741;

different initial values lead to different results, how to find and detect the best one? Thanks!

Edited by - cc261 on 01/26/2016 10:03:15 PM

AmandaLu

439 Posts

Posted - 01/05/2016 :  02:47:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi cc261,

Initial parameter values are very important for fitting user-defined function. Please refer to the following FAQ:

http://www.originlab.com/doc/Quick-Help/Effect-of-InitialParameters-in-Fitting

For user-defined functions, you must decide the initial parameters by yourself, depending on your understanding of the data and function you want to fit with.

When I tried your data, I found that if you restrict c2 to a very small value and fix c1 and c2, the fitting may converge.



Thanks,
Amanda
Go to Top of Page

cc261

22 Posts

Posted - 01/06/2016 :  09:51:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, AmandaLu, thanks for your patient answer.

Don't know how to guess and get the initial start values of each parameter, it is very difficult and hard task for common persons doing such work.

Fortunately,I get much better results by using a software called "1stOpt", very easy for using, the excellent feature is no need for guessing initial start values of parameters, as a special global optimization algorithm applied.

The result is:

Root of Mean Square Error (RMSE):0.0108854563411185
Sum of Square Error:0.000947945278035172
Correlation Coef. (R): 0.997324685935054
R-Square: 0.994656529175454

Parameter Best Estimate
---------- -------------
c1 -54.9880423846096
c2 8.53064321329453E-6
c4 -0.0290544579822787
c5 56.0917588008215
c3 -0.0808780251097204

Hope the next version of Origin will have such optimization algorithm, and the guess of initial start values of parameter will no long be needed.
Go to Top of Page

cc261

22 Posts

Posted - 01/24/2016 :  10:00:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
One more example below shows how difficult the curve fitting without the efficient algorithms:

Function: y=p1*sqrt(1+p1/(p2+(2*p3*x)/(p3+x)))+p4;
Data:
x=220e-12,100e-12,82e-12,68e-12,62e-12,56e-12,51e-12,47e-12,33e-12,22e-12,18e-12,15e-12,12e-12,10e-12,8.2e-12,6e-12,5e-12,4e-12,2e-12;
y=457.4869,460.1402,460.7146,461.0712,461.2324,461.3509,461.5366,461.6420,462.1285,462.4853,462.6571,462.7146,462.8871,462.8972,463.0256,463.0687,463.1402,463.1748,463.2594;

No need any effort, the best result from 1stOpt is (without the guess of initial start values of parameters):

Root of Mean Square Error (RMSE): 0.0267224707560544
Sum of Square Error: 0.0135677184228555
Correlation Coef. (R): 0.999815842887048
R-Square: 0.999631719687939

However, what's from Origin? hard and impossible? It is a nightmare to get same good results as 1stOpt. The biggest problem for Origin, I think, is its optimization algorithms used for curve fitting are backward right now, and has been not changed and improved for years. it is time for change!
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000