Data Fitting with Hyperbolic and Lorentzian Function

4 次查看(过去 30 天)
Hi everyone,
I'm trying to fit my data (current through a device) at different temperatures with two models. The first one looks like this:
ft = fittype( 'a*cosh( b*(c-x) )^-2', 'independent', 'x', 'dependent', 'y' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Algorithm = 'Levenberg-Marquardt';
opts.Robust = 'Bisquare';
while the second is specified as follow (it's a Lorentzian function):
ft = fittype( 'a / (1 + ((x-b) / c)^2)', 'independent', 'x', 'dependent', 'y' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Robust = 'LAR';
I'm plotting the various coefficients (a, b, c) as the T increases.
I was wondering if someone could clarify me how those coeffiecients are calculated. I think the first one gets the full width of the data while the second gets the FWHM (the shape of the first function is similar to the second, but differentiates on the tail parts). This is quite relevant to me because I need to compare the two models, but the coefficients that I get so far are hardly comparable.
Thanks in advance.
  3 个评论
Alessandro Lodi
Alessandro Lodi 2020-4-21
Thanks Michal for your reply.
From a physical point of view, the model I'm studying should observe a transistion between the two lineshapes above certain T because the physics underlying it changes.
I'm aware that the problem of comparying directly those two lineshapes it's intrinsically incorrect, but was wondering if you'd have any suggestions on which statisical parameters could be valuable to extract from the fit object - I've already got the coefficient of determination and the RMSE for each fitting at each temperature.
Best,
Alessandro
Michael Soskind
Michael Soskind 2020-4-23
Hi Alessandro,
All of the statements you make are correct and very important to note. The temperature does in fact lead to underlying changes in the physics, particularly when looking at this topic from a spectroscopic perspective. It is a bit difficult to say whether other statistical tehcniques are necessary. From my knowledge, the most commonly used statistical parameters to extract from the fit would be the RMSE.
Something that you seem to indicate is that you are looking for something to compare these different coefficients. There are other types of norms that could be used, rather than square error, you could do an alternatively weighted error. Typically, RMSE is what I have seen when using different fitting models. Maybe something useful is the attached file. This goes through some different fit types, and shows that RMSE is the most common method for evaluating fit.
I hope this helps,
Michael

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by