Save the date! Google I/O returns May 18-20 Register now

oryx.experimental.mcmc.metropolis

Returns a program that takes a Metropolis step with an inner kernel.

The Metropolis algorithm is a special case of Metropolis-Hastings for symmetric proposal distributions. This algorithm assumes the inner_step program is symmetric (i.e. p(y | x) = p(x | y)). Args: unnormalized_log_prob: A function that computes the log probability of a state. inner_step: A probabilistic program that acts as the proposal distribution for a Metropolis step. Returns: A program that proposes a new state and accepts or rejects according to the unnormalized log probability.