tfp.experimental.mcmc.SequentialMonteCarloResults

View source on GitHub

Auxiliary results from a Sequential Monte Carlo step.

This structure serves as the kernel_results for the SequentialMonteCarlo transition kernel.

Elements:

  • steps: scalar int Tensor number of inference steps completed so far.
  • parent_indices: int Tensor of shape [num_particles, b1, ..., bN], such that parent_indices[k] gives the indice(s) of the particle(s) at the previous step from which the the kth current particle is immediately descended. See also tfp.experimental.mcmc.reconstruct_trajectories.
  • incremental_log_marginal_likelihood: float Tensor of shape [b1, ..., bN], giving the natural logarithm of an unbiased estimate of the ratio in normalizing constants incurred in the most recent step (typically this is the likelihood of observed data). Note that (by Jensen's inequality) this is smaller in expectation than the true log ratio.
  • cumulative_log_marginal_likelihood: float Tensor of shape [b1, ..., bN], giving the natural logarithm of an unbiased estimate of the ratio in normalizing constants incurred since the initial step (typically this is the likelihood of observed data). Note that (by Jensen's inequality) this is smaller in expectation than the true log ratio.

In some contexts, results may be stacked across multiple inference steps, in which case all Tensor shapes will be prefixed by an additional dimension of size num_steps.

steps

parent_indices

incremental_log_marginal_likelihood

accumulated_log_marginal_likelihood