Skip to content
Snippets Groups Projects
Verified Commit 9625f11c authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Sébastien Villemot
Browse files

:bug: allow cova_compute=0 with user-defined MCMC_jumping_covariance

(cherry picked from commit 35b1a685)
parent 1bf379b8
No related branches found
No related tags found
No related merge requests found
...@@ -379,12 +379,14 @@ end ...@@ -379,12 +379,14 @@ end
% here are all samplers requiring a proposal distribution % here are all samplers requiring a proposal distribution
if ~strcmp(posterior_sampler_options.posterior_sampling_method,'slice') if ~strcmp(posterior_sampler_options.posterior_sampling_method,'slice')
if ~options_.cova_compute && ~(options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix) if ~options_.cova_compute && ~(options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix)
if strcmp('hessian',options_.MCMC_jumping_covariance)
skipline() skipline()
disp('check_posterior_sampler_options:: I cannot start the MCMC because the Hessian of the posterior kernel at the mode was not computed') disp('check_posterior_sampler_options:: I cannot start the MCMC because the Hessian of the posterior kernel at the mode was not computed')
disp('check_posterior_sampler_options:: or there is no previous MCMC to load ') disp('check_posterior_sampler_options:: or there is no previous MCMC to load ')
error('check_posterior_sampler_options:: MCMC cannot start') error('check_posterior_sampler_options:: MCMC cannot start')
end end
end 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; [~, invhess] = compute_mh_covariance_matrix;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment