我正在使用 cftool 自定义拟合 Mössbauer 光谱数据。有两个系数,Gamma 和 N0。
N = f(v)
= (299792458000^2*Gamma^2*N0)/(299792458000^2*Gamma^2+4*v^2*(4.29383292e-15)^2)
使用默认设置(信任区域、健壮关闭等)我得到以下拟合:
Fit computation did not converge:
Fitting stopped because the number of iterations or function evaluations exceeded the specified maximum.
Fit found when optimization terminated:
General model:
f(v) = (299792458000^2*Gamma^2*N0)/(299792458000^2*Gamma^2+4*v^2*(4.29383292e-
15)^2)
Coefficients (with 95% confidence bounds):
Gamma = 0.9137 (-Inf, Inf)
N0 = 2.454e+04 (2.059e+04, 2.849e+04)
Goodness of fit:
SSE: 6.41e+11
R-square: -2068
Adjusted R-square: -2073
RMSE: 4.013e+04
Warning: A negative R-square is possible if the model does not contain a constant term and the fit is poor (worse than just fitting the mean). Try changing the model or using a different StartPoint.
如果我切换到 Levenberg-Marquardt,我会通过数据得到一条直线:
General model:
f(v) = (299792458000^2*Gamma^2*N0)/(299792458000^2*Gamma^2+4*v^2*(4.29383292e-
15)^2)
Coefficients (with 95% confidence bounds):
Gamma = 0.793 (-Inf, Inf)
N0 = 6.456e+04 (6.447e+04, 6.465e+04)
Goodness of fit:
SSE: 3.098e+08
R-square: 2.22e-16
Adjusted R-square: -0.002513
RMSE: 882.3
为什么这两种情况都如此糟糕?