This kernel uses an online variance estimate to adjust a diagonal covariance
matrix for each of the state parts. More specifically, the
momentum_distribution of the innermost kernel is set to a diagonal
multivariate normal distribution whose variance is the inverse of the
online estimate. The inverse of the covariance of the momentum is often called
the "mass matrix" in the context of Hamiltonian Monte Carlo.
This preconditioning scheme works well when the covariance is diagonally
dominant, and may give reasonable results even when the number of draws is
less than the dimension. In particular, it should generally do a better job
than no preconditioning, which implicitly uses an identity mass matrix.
Note that this kernel does not implement a calibrated sampler; rather, it is
intended to be used as one step of an iterative adaptation process. It
should not be used when drawing actual samples.
tfp.experimental.stats.RunningVariance-like object, or list of them,
for a batch of momentum distributions. These use update on the state
to maintain an estimate of the variance, and so space, and so must have
a structure compatible with the state space.
A callable with the signature
(kernel_results, new_momentum_distribution) -> new_kernel_results
where kernel_results are the results of the inner_kernel,
new_momentum_distribution is a CompositeTensor or a nested
collection of CompositeTensors, and new_kernel_results are a
possibly-modified copy of kernel_results. The default,
hmc_like_momentum_distribution_setter_fn, presumes HMC-style
kernel_results, and sets the momentum_distribution only under the
Python bool. When True kernel parameters are checked
for validity. When False invalid inputs may silently render incorrect
Python str name prefixed to Ops created by this class. Default:
Returns True if Markov chain converges to specified distribution.
TransitionKernels which are "uncalibrated" are often calibrated by
composing them with the tfp.mcmc.MetropolisHastingsTransitionKernel.
Return dict of __init__ arguments and their values.
Non-destructively creates a deep copy of the kernel.
Python String/value dictionary of
initialization arguments to override with new values.
TransitionKernel object of same type as self,
initialized with the union of self.parameters and
override_parameter_kwargs, with any shared keys overridden by the
value of override_parameter_kwargs, i.e.,