Allow passing of optim option for TaRB

time-shift
Johannes Pfeifer 2016-05-15 14:18:28 +02:00
parent 90ab263587
commit 4898a66d2a
3 changed files with 8 additions and 1 deletions

View File

@ -126,6 +126,9 @@ if init,
case 'mode_compute'
posterior_sampler_options.mode_compute=options_list{i,2};
case 'optim'
posterior_sampler_options.optim_opt=options_list{i,2};
case 'new_block_probability'
if options_list{i,2}<0 || options_list{i,2}>1
error('check_posterior_sampler_options:: The tarb new_block_probability must be between 0 and 1!')
@ -333,7 +336,7 @@ if init,
end
otherwise
error('check_posterior_sampler_options:: Unknown posterior_sampling_method option %s ',posterior_sampler_options.posterior_sampling_method);
end
return

View File

@ -469,6 +469,7 @@ options_.posterior_sampler_options.tarb.proposal_distribution = 'rand_multivaria
options_.posterior_sampler_options.tarb.student_degrees_of_freedom = 3;
options_.posterior_sampler_options.tarb.mode_compute=4;
options_.posterior_sampler_options.tarb.new_block_probability=0.25; %probability that next parameter belongs to new block
options_.posterior_sampler_options.tarb.optim_opt=''; %probability that next parameter belongs to new block
% Slice
options_.posterior_sampler_options.slice.proposal_distribution = '';
options_.posterior_sampler_options.slice.rotated=0;

View File

@ -117,6 +117,9 @@ localVars = struct('TargetFun', TargetFun, ...
if strcmp(sampler_options.posterior_sampling_method,'tailored_random_block_metropolis_hastings');
localVars.options_.silent_optimizer=1; %locally set optimizer to silent mode
if ~isempty(sampler_options.optim_opt)
localVars.options_.optim_opt=sampler_options.optim_opt; %locally set options for optimizer
end
end
% User doesn't want to use parallel computing, or wants to compute a