Merge pull request #799 from JohannesPfeifer/simplex
Further fixes to simplex algorithm related to unset optionstime-shift
commit
6aa7c038ef
|
@ -480,6 +480,7 @@ simplex.maxiter = 5000;
|
|||
simplex.maxfcallfactor = 500;
|
||||
simplex.maxfcall = [];
|
||||
simplex.verbosity = 2;
|
||||
simplex.delta_factor=0.05;
|
||||
options_.simplex = simplex;
|
||||
|
||||
% CMAES optimization routine.
|
||||
|
|
|
@ -54,7 +54,9 @@ number_of_variables = length(x);
|
|||
|
||||
% get options.
|
||||
if isempty(options.maxfcall)
|
||||
max_func_calls = options.maxfcallfactor*number_of_variables
|
||||
max_func_calls = options.maxfcallfactor*number_of_variables;
|
||||
else
|
||||
max_func_calls=options.maxfcall;
|
||||
end
|
||||
|
||||
% Set tolerance parameter.
|
||||
|
@ -155,8 +157,8 @@ else
|
|||
end
|
||||
|
||||
% Set delta parameter.
|
||||
if isfield(options,'delta_parameter')% Size of the simplex
|
||||
delta = options.delta_parameter;
|
||||
if isfield(options,'delta_factor')% Size of the simplex
|
||||
delta = options.delta_factor;
|
||||
else
|
||||
delta = 0.05;
|
||||
end
|
||||
|
|
|
@ -72,4 +72,11 @@ varobs gp_obs gy_obs;
|
|||
|
||||
options_.solve_tolf = 1e-12;
|
||||
|
||||
estimation(order=1,datafile=fsdat_simul,nobs=192,mode_compute=8,loglinear,mh_replic=0);
|
||||
estimation(order=1,datafile=fsdat_simul,nobs=192,mode_compute=8,loglinear,mh_replic=0,optim=(
|
||||
'MaxIter',5000,
|
||||
'TolFun',1e-4,
|
||||
'TolX',1e-4,
|
||||
'MaxFunEvals',5000,
|
||||
'MaxFunEvalFactor',500,
|
||||
'InitialSimplexSize',0.05
|
||||
));
|
||||
|
|
Loading…
Reference in New Issue