Help protect the Great Barrier Reef with TensorFlow on Kaggle

# tfp.experimental.mcmc.resample_independent

Categorical resampler for sequential Monte Carlo.

The return value 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 the `Categorical` distribution. For large input values this function should give better performance than using `Categorical`. 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)][1]. It is also known as multinomial resampling as described in [Doucet et al. (2011)][2].

`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.
`seed` PRNG seed; see `tfp.random.sanitize_seed` for details. Default value: None (i.e. no seed).
`name` Python `str` name for ops created by this method. Default value: `None` (i.e., `'resample_independent'`).

`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 [2]: 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

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]