Commit 60cd13a3 authored by Johannes Pfeifer 's avatar Johannes Pfeifer

posterior_sampler_initialization.m: provide missing function input

Fixes #1622
parent 1501032a
Pipeline #1564 passed with stages
in 71 minutes and 45 seconds
......@@ -366,8 +366,8 @@ elseif options_.mh_recover
FirstLine = ones(NumberOfBlocks,1);
LastFileFullIndicator=1;
end
if ~isequal(options_.posterior_sampler_options.posterior_sampling_method,'slice'),
[d,bayestopt_]=set_proposal_density_to_previous_value(record,options_,bayestopt_);
if ~isequal(options_.posterior_sampler_options.posterior_sampling_method,'slice')
[d,bayestopt_]=set_proposal_density_to_previous_value(record,options_,bayestopt_,d);
end
%% Now find out what exactly needs to be redone
% 1. Check if really something needs to be done
......@@ -464,9 +464,14 @@ if isfield(record,'ProposalCovariance') && isfield(record,'ProposalCovariance')
d=record.ProposalCovariance;
bayestopt_.jscale=record.ProposalScaleVec;
else
if options_.mode_compute~=0
fprintf('Estimation::mcmc: No stored previous proposal density found, continuing with the one implied by mode_compute\n.');
elseif ~isempty(options_.mode_file)
fprintf('Estimation::mcmc: No stored previous proposal density found, continuing with the one implied by the mode_file\n.');
if ~isequal(options_.posterior_sampler_options.posterior_sampling_method,'slice')
% pass through input d unaltered
if options_.mode_compute~=0
fprintf('Estimation::mcmc: No stored previous proposal density found, continuing with the one implied by mode_compute\n.');
elseif ~isempty(options_.mode_file)
fprintf('Estimation::mcmc: No stored previous proposal density found, continuing with the one implied by the mode_file\n.');
else
error('Estimation::mcmc: No stored previous proposal density found, no mode-finding conducted, and no mode-file provided. I don''t know how to continue')
end
end
end
Markdown is supported
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