vectorize the genetic algorithm optimization
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!