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 个评论
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 Center 和 File 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!