Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
ce40f0eb
Commit
ce40f0eb
authored
Mar 03, 2012
by
Johannes Pfeifer
Committed by
Stéphane Adjemian
Mar 04, 2012
Browse files
Add CMAES (Ticket #245) for mode optimization
parent
bad8746e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
doc/dynare.texi
View file @
ce40f0eb
...
...
@@ -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
...
...
matlab/cmaes.m
0 → 100644
View file @
ce40f0eb
This diff is collapsed.
Click to expand it.
matlab/dynare_estimation_1.m
View file @
ce40f0eb
...
...
@@ -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)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment