Skip to content

Slice sampler

Marco Ratto requested to merge rattoma:slice into master

This branch adds the slice sampler by factorizing at the same time posterior sampling iteration. This means all samplers [RW metropolis, independent metropolis and slice] use the same routines to run: posterior_sampler posterior_sampler_core while posterior_sampler_iteration triggers the individual sampler at each iteration.

@JohannesPfeifer in principle this could be done also for TaRB, but I did not added yet TaRB steps into posterior_sampler_iteration, so I still call TaRB from posterior_sampler.

Under this setting, any new posterior sampler (including slice) is already automatically parallelized.

If things are OK, the following routines become isolated and no longer used: metropolis_hastings_initialization random_walk_metropolis_hastings.m random_walk_metropolis_hastings_core.m independent_metropolis_hastings.m independent_metropolis_hastings_core.m

The new routines posterior_sampler_initialization.m etc are already merged merged with recent new commits by @JohannesPfeifer in particular about mh_recover. I was unsure whether it would have been better just a renaming of the parent routines

metropolis_hastings_initialization random_walk_metropolis_hastings.m random_walk_metropolis_hastings_core.m

from which I started to develop

posterior_sampler_initialization posterior_sampler.m posterior_sampler_core.m

Merge request reports