vectorize the genetic algorithm optimization
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I am using the genetic algorithm (GA) to fit the kinetic parameters of an ode system. Using the default settings, I could not finish one iteration in 3 days on a MacPro laptop. Since this is the first time that I code a fitting program and use the GA, I am not sure if this is normal. I want to try to vectorize my fitting objective to speed up the process. Does anybody know how to vectorize the ode part of the process? My fitting objective function is attached.
Thank you for your time. Any suggestion is appreciated.
---- fitting objective function starts
function error = IL6_STAT3_fittness(param)
global lags tspan
global time_obs pSTAT3_obs yy0
sol = dde23(@(t,x,lags,param) IL6_STAT3_reduced(t,x,lags,param), lags, yy0, tspan, [], param);
pSTAT3_sim = sol.y(6,:) + sol.y(7,:);
% interpolate dde23 output at observed timepoints
pSTAT3_int = interp1(sol.x, pSTAT3_sim, time_obs); % simulated data
error = sum((pSTAT3_int - pSTAT3_obs).^2);
---- fitting objective function ends
Thanks, Wendy
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!