|View source on GitHub|
A systematic resampler for sequential Monte Carlo.
tfp.experimental.mcmc.resample_systematic( log_probs, event_size, sample_shape, seed=None, name=None )
The value returned from this function is similar to sampling with
expanded_sample_shape = tf.concat([[event_size], sample_shape]), axis=-1) tfd.Categorical(logits=log_probs).sample(expanded_sample_shape)`
but with values sorted along the first axis. It can be considered to be
sampling events made up of a length-
event_size vector of draws from
Categorical distribution. However, although the elements of
this event have the appropriate marginal distribution, they are not
independent of each other. Instead they are drawn using a stratified
sampling method that in some sense reduces variance and is suitable for
use with Sequential Monte Carlo algorithms as described in
[Doucet et al. (2011)].
The sortedness is an unintended side effect of the algorithm that is
harmless in the context of simple SMC algorithms.
This implementation is based on the algorithms in [Maskell et al. (2006)] where it is called minimum variance resampling.
||A tensor-valued batch of discrete log probability distributions.|
||the dimension of the vector considered a single draw.|
||a tensor of samples.|
: S. Maskell, B. Alun-Jones and M. Macleod. A Single Instruction Multiple Data Particle Filter. In 2006 IEEE Nonlinear Statistical Signal Processing Workshop. http://people.ds.cam.ac.uk/fanf2/hermes/doc/antiforgery/stats.pdf : A. Doucet & A. M. Johansen. Tutorial on Particle Filtering and Smoothing: Fifteen Years Later In 2011 The Oxford Handbook of Nonlinear Filtering https://www.stats.ox.ac.uk/~doucet/doucet_johansen_tutorialPF2011.pdf