tfp.experimental.mcmc.resample_deterministic_minimum_error

Deterministic minimum error resampler for sequential Monte Carlo.

The return value of this function is similar to sampling with

  expanded_sample_shape = tf.concat([sample_shape, [event_size]]), axis=-1)
  tfd.Categorical(logits=log_probs).sample(expanded_sample_shape)`

but with values chosen deterministically so that the empirical distribution is as close as possible to the specified distribution. (Note that the empirical distribution can only exactly equal the requested distribution if multiplying every probability by event_size gives an integer. So in general this is a biased "sampler".) It is intended to provide a good representative sample, suitable for use with some Sequential Monte Carlo algorithms.

This function is based on Algorithm #3 in [Maskell et al. (2006)][1].

log_probs a tensor-valued batch of discrete log probability distributions.
event_size the dimension of the vector considered a single draw.
sample_shape the sample_shape determining the number of draws. Because this resampler is deterministic it simply replicates the draw you would get for sample_shape=[1].
seed This argument is unused but is present so that this function shares its interface with the other resampling functions. Default value: None
name Python str name for ops created by this method. Default value: None (i.e., 'resample_deterministic_minimum_error').

resampled_indices a tensor of samples.

References

[1]: 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