最近在處理多b值MRI曲線擬合的數據,每組的數據結構如下
b:[0 20 50 80 100 150 200 400 600 800 1000];
S:[297 283.8 265.2 257.2 256.1 225.8 215.2 169.9 138.5 109.8 101.5];
DWI-MRI成像中b值和信號強度的比值關係如下:
- 單指數模型:S(b)/S(0) = exp(-b*ADC);
- 雙指數模型:
- 拉伸指數:
- DKI
- …
有了b值和S值,怎麼擬合得到這些參數呢?利用MATLAB的曲線擬合工具箱可以很好的解決這些問題;
舉個例子DKI擬合,對應的Matlab函數
ft = fittype( 'exp(-a*x+x^2*a^2*b/6)', 'independent', 'x', 'dependent', 'y' );
opts = fitoptions( ft );
opts.Algorithm = 'Levenberg-Marquardt';
opts.Display = 'Off';
opts.Lower = [-Inf -Inf];
opts.StartPoint = DKI_start;
opts.Upper = [Inf Inf];
[fitresult, gof] = fit( xData, yData, ft, opts );
[fitresult, gof]存儲擬合的結果參數!但是曲線擬合工具箱對參數的初始值非常敏感,有沒有一種擬合方法可以全局搜索出全局最優值?
http://cn.mathworks.com/help/gads/globaloptimsolution-class.html
其實題主也在試探性的研究這個問題,根據網上搜索的資料,初步可以認定Matlab最優化工具箱具有解決這個問題的潛在可能:
Matlab中有兩個全局最長沙鐵路段曹輝優化函數:Multistart和GlobalSearch
fun = @(a,x) exp(-a*x);
problem = createOptimProblem('lsqcurvefit','objective', fun,'xdata',xdata,'ydata',ydata, 'x0',0.001);
ms = MultiStart;
% ms = GlobalSearch;
[a,fval,exitflag,output,solutions] = run(ms, problem,50);