Commit d67f1ecd authored by stepan's avatar stepan
Browse files

+ Added comments.
+ Cosmetic changes.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2725 ac1d8469-bf42-47a9-8791-bf33cf982152
parent a9d7088c
......@@ -107,14 +107,13 @@ function get_prior_info(info)
end
if info==2% Prior optimization.
% Initialize to the prior mode if possible
k = find(~isnan(bayestopt_.p5));
xparam1(k) = bayestopt_.p5(k);
% Pertubation of the initial condition.
look_for_admissible_initial_condition = 1;
scale = 1.0;
iter = 0;
while look_for_admissible_initial_condition
xinit = xparam1+scale*randn(size(xparam1));
if all(xinit>bayestopt_.p3) && all(xinit<bayestopt_.p4)
......@@ -128,22 +127,20 @@ function get_prior_info(info)
end
end
end
% Maximization
[xparams,lpd,hessian] = ...
maximize_prior_density(xinit, bayestopt_.pshape, ...
bayestopt_.p6, ...
bayestopt_.p7, ...
bayestopt_.p3, ...
bayestopt_.p4);
disp(' ')
disp(' ')
disp('------------------')
disp('PRIOR OPTIMIZATION')
disp('------------------')
disp(' ')
% Display the results.
disp(' ')
disp(' ')
disp('------------------')
disp('PRIOR OPTIMIZATION')
disp('------------------')
disp(' ')
for i = 1:length(xparams)
disp(['deep parameter ' int2str(i) ': ' get_the_name(i,0) '.'])
disp([' Initial condition ....... ' num2str(xinit(i)) '.'])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment