T O P I C R E V I E W |
cc261 |
Posted - 01/04/2016 : 09:46:00 AM 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! |
3 L A T E S T R E P L I E S (Newest First) |
cc261 |
Posted - 01/24/2016 : 10:00:45 AM 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! |
cc261 |
Posted - 01/06/2016 : 09:51:02 AM 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. |
AmandaLu |
Posted - 01/05/2016 : 02:47:38 AM 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 |
|
|