Add CMAES (Ticket #245) for mode optimization
parent
bad8746e77
commit
ce40f0ebfc
|
@ -3888,6 +3888,9 @@ Uses Dynare implementation of the Nelder-Mead simplex based optimization
|
|||
routine (generally more efficient than the MATLAB or Octave implementation
|
||||
available with @code{mode_compute=7})
|
||||
|
||||
@item 9
|
||||
Uses the CMA-ES (Covariance Matrix Adaptation Evolution Strategy) algorithm, an evolutionary algorithm for difficult non-linear non-convex optimization
|
||||
|
||||
@item @var{FUNCTION_NAME}
|
||||
It is also possible to give a @var{FUNCTION_NAME} to this option,
|
||||
instead of an @var{INTEGER}. In that case, Dynare takes the return
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -268,7 +268,24 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
|
|||
case 8
|
||||
% Dynare implementation of the simplex algorithm.
|
||||
[xparam1,fval,exitflag] = simplex_optimization-routine(objective_function,xparam1,optim_options,dataset_,options_,M_,estim_params_,bayestopt_,oo_);
|
||||
case 101
|
||||
case 9
|
||||
H0 = 1e-4*ones(nx,1);
|
||||
opts.SaveVariables='off';
|
||||
opts.DispFinal='on';
|
||||
opts.WarnOnEqualFunctionValues='no';
|
||||
opts.DispModulo='10';
|
||||
opts.LogModulo='0';
|
||||
opts.LogTime='0';
|
||||
warning('off','CMAES:NonfinitenessRange');
|
||||
warning('off','CMAES:InitialSigma');
|
||||
if ~options_.dsge_var
|
||||
[x, fval, COUNTEVAL, STOPFLAG, OUT, BESTEVER] = cmaes('dsge_likelihood',xparam1,H0,opts,dataset_,options_,M_,estim_params_,bayestopt_,oo_);
|
||||
else
|
||||
[x, fval, COUNTEVAL, STOPFLAG, OUT, BESTEVER] = cmaes('DsgeVarLikelihood',xparam1,H0,opts,dataset_,options_,M_,estim_params_,bayestopt_,oo_);
|
||||
end
|
||||
xparam1=BESTEVER.x;
|
||||
disp(sprintf('\n Objective function at mode: %f',fval))
|
||||
case 101
|
||||
myoptions=soptions;
|
||||
myoptions(2)=1e-6; %accuracy of argument
|
||||
myoptions(3)=1e-6; %accuracy of function (see Solvopt p.29)
|
||||
|
|
Loading…
Reference in New Issue