Apply Parallel Computing to Simbiology
Ältere Kommentare anzeigen
Hello guys,
Please bare with my naive, if I ask something silly. It is my first time try to use the parallel computing.
Beacuse my model in Simbiology is quite complicated, I am trying to use parallel computing toolbox to speed up my model fitting.
However, I got this error and I could not eliminate it... I don't know if my code is wrong completely or I misunderstand the application of the parallel computing toolbox or it is able to be fixed.
Here is my code.
%%
% Estimate Parameters
EstimationFunction = {'lsqnonlin', 'fmincon', 'fminunc'};
parfor i = 1:length(EstimationFunction)
fitConst = sbiofit(model,gData,responseMap,estimatedParams,dose, string(EstimationFunction(i)),[],variants,...
'ErrorModel','constant','ProgressPlot',true);
% Plot Results
s = struct;
s.Labels.XLabel = 'Time (hour)';
s.Labels.YLabel = 'Concentration (microgram/milliliter)';
plot(fitConst,'AxesStyle',s);
plotActualVersusPredicted(fitConst);
plotResidualDistribution(fitConst);
fitProp = sbiofit(model,gData,responseMap,estimatedParams,dose,string(EstimationFunction(i)),[],variants,...
'ErrorModel','proportional','ProgressPlot',true);
% Plot Results
plot(fitProp,'AxesStyle',s);
plotActualVersusPredicted(fitProp);
plotResidualDistribution(fitProp);
fitExp = sbiofit(model,gData,responseMap,estimatedParams,dose,string(EstimationFunction(i)),[],variants,...
'ErrorModel','exponential','ProgressPlot',true);
% Plot Results
plot(fitExp,'AxesStyle',s);
plotActualVersusPredicted(fitExp);
plotResidualDistribution(fitExp);
fitComb = sbiofit(model,gData,responseMap,estimatedParams,dose,string(EstimationFunction(i)),[],variants,...
'ErrorModel','combined','ProgressPlot',true);
% Plot Results
plot(fitComb,'AxesStyle',s);
plotActualVersusPredicted(fitComb);
plotResidualDistribution(fitComb);
%%
% Information Criteria for Model Selection
allResults = [fitConst,fitProp,fitExp,fitComb];
ErrorModelNames = {'constant error model','proportional error model','exponential error model',...
'combined error model'};
LogLikelihood = [allResults.LogLikelihood]';
AIC = [allResults.AIC]';
BIC = [allResults.BIC]';
t1 = table(LogLikelihood,AIC,BIC);
t1.Properties.RowNames = ErrorModelNames;
end
Here is the error I got.
Error using SimBiology.fit.internal.plots.liveplots.Dashboard/initializePlots
Cannot set WindowStyle to 'docked' when MATLAB is started with no display or when the -noFigureWindows option is specified.
Error in SimBiology.fit.internal.plots.liveplots.Dashboard
Error in SimBiology.fit.internal.plots.liveplots.Controller/createDashboard
Error in SimBiology.fit.internal.FitObject/initializeLivePlotsController (line 770)
obj.LivePlotsController.createDashboard(bounds);
Error in SimBiology.fit.internal.FitObject/fit (line 169)
[obj, cleanupDashboard] = obj.initializeLivePlotsController(); %#ok<ASGLU>
Error in sbiofit (line 298)
[varargout{1:nargout}] = fitObject.fit(modelObj, data, responseMap, estimInfo, varargin{:});
Error in runfitdoxdata20200223model (line 131)
parfor i = 1:length(EstimationFunction)
Please give me any suggestion or advice. Thank you very much.
Have a nice day.
Jesse
Akzeptierte Antwort
Weitere Antworten (0)
Communitys
Weitere Antworten in SimBiology Community
Kategorien
Mehr zu Scan Parameter Ranges finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!