Skip to content
Snippets Groups Projects
Verified Commit 4a6783c6 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fix #1914.

Also the first input argument of was wrong (we do not pass bayestopt_
anymore but only the list of estimated parameter names, field `name`).
parent 9225e6b6
Branches
Tags
No related merge requests found
...@@ -464,12 +464,10 @@ if ~strcmp(posterior_sampler_options.posterior_sampling_method,'slice') ...@@ -464,12 +464,10 @@ if ~strcmp(posterior_sampler_options.posterior_sampling_method,'slice')
end end
if options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix if options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix
[~, invhess] = compute_mh_covariance_matrix(bayestopt_,fname,dname,outputFolderName); [~, invhess] = compute_posterior_covariance_matrix(bayestopt_.name, fname, dname, outputFolderName);
posterior_sampler_options.invhess = invhess; posterior_sampler_options.invhess = invhess;
end end
% check specific options for slice sampler % check specific options for slice sampler
if strcmp(posterior_sampler_options.posterior_sampling_method,'slice') if strcmp(posterior_sampler_options.posterior_sampling_method,'slice')
invhess = posterior_sampler_options.invhess; invhess = posterior_sampler_options.invhess;
......
...@@ -51,7 +51,7 @@ TotalNumberOfMhDraws = sum(record.MhDraws(:,1)); ...@@ -51,7 +51,7 @@ TotalNumberOfMhDraws = sum(record.MhDraws(:,1));
TODROP = floor(options_.mh_drop*TotalNumberOfMhDraws); TODROP = floor(options_.mh_drop*TotalNumberOfMhDraws);
fprintf('marginal density: I''m computing the posterior mean and covariance... '); fprintf('marginal density: I''m computing the posterior mean and covariance... ');
[posterior_mean,posterior_covariance,posterior_mode,posterior_kernel_at_the_mode] = compute_mh_covariance_matrix(bayestopt_,M_.fname,M_.dname,outputFolderName); [posterior_mean, posterior_covariance, posterior_mode, posterior_kernel_at_the_mode] = compute_posterior_covariance_matrix(bayestopt_.name, M_.fname, M_.dname, outputFolderName);
MU = transpose(posterior_mean); MU = transpose(posterior_mean);
SIGMA = posterior_covariance; SIGMA = posterior_covariance;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment