T O P I C R E V I E W |
th0 |
Posted - 07/09/2019 : 05:03:30 AM Origin Ver. and Service Release (Select Help-->About Origin): b9.5.0.193 Operating System: win10
Hi there, I am using the NLFit to fit stretched exponential data. In the past, this always worked and on an older Origin version the presented data is not problematic.
What I have: A copy of the ExpDec1 that includes an arbitrary stretched exponential parameter: y = A1 * exp((-x/t1)^b1) + y0 I force b1 to be 1 in the beginning. This fitting function works nice on an Origin from 2015 or so. It is also used in this forum: https://my.originlab.com/forum/topic.asp?TOPIC_ID=40795 (though I do not understand what is his problem there).
Origin tells me that the fit does converge without performing any fitting - it takes the calculated initial parameters and claims that the fit converged after the first iteration: --- (49) ----------Levenberg-Marquardt----------- Reduced Chi-sqr = 0.0021043241167 COD(R^2) = 0.97233115725141 Iterations Performed = 1 Total Iterations in Session = 1 (50) Fit converged. Chi-Sqr tolerance value of 1E-9 was reached. ---
However, the fit obviously did not converge. If I set the starting value of b1 to anything but 1, Origin errors after 0 iterations that the fit does not converge: --- (51) ----------Levenberg-Marquardt----------- Reduced Chi-sqr = 0.100196807768 Iterations Performed = 0 Total Iterations in Session = 1 (52) Fit did not converge - reason unknown.
---
If I change the fitting function to look like this: y = A1 * exp((-x^b1/t1)) + y0
everything works fine: --- (56) ----------Levenberg-Marquardt----------- Reduced Chi-sqr = 5.79336207538E-5 COD(R^2) = 0.99923825601305 Iterations Performed = 78 Total Iterations in Session = 78 (57) Fit converged. Chi-Sqr tolerance value of 1E-9 was reached. ---
but then in order to get the correct t1 I have to manually calculate t1^b1, which is of course possible, but not convenient.
Any leads?
|
2 L A T E S T R E P L I E S (Newest First) |
th0 |
Posted - 07/09/2019 : 05:47:03 AM Hi! Thanks for your quick reply and the solution. I was focused on the fact that the fit converges and did not consider an error in the fitting function, but at second glance it's rather obvious.
I cannot update to 2019 as I'm on an institutional license and we just have what we have. But thanks for hinting to the library, when we update next year I will certainly use it.
th0 |
AmandaLu |
Posted - 07/09/2019 : 05:39:25 AM Hi,
The fitting function is wrong, please use this one:
y = A1 * exp(-(x/t1)^b1) + y0
BTW, this function is included in Fitting Function Library App. You are welcome to upgrade to Origin 2019 and try this App:
https://www.originlab.com/fileExchange/details.aspx?fid=490
Thanks, Amanda OrigjinLab Technical Service
|
|
|