blackjax.mcmc.rmhmc#
Attributes#
Functions#
|
A Riemannian Manifold Hamiltonian Monte Carlo kernel |
Module Contents#
- as_top_level_api(logdensity_fn: Callable, step_size: float, mass_matrix: blackjax.mcmc.metrics.Metric | Callable, num_integration_steps: int, *, divergence_threshold: int = 1000, integrator: Callable = integrators.implicit_midpoint) blackjax.base.SamplingAlgorithm [source]#
A Riemannian Manifold Hamiltonian Monte Carlo kernel
Of note, this kernel is simply an alias of the
hmc
kernel with a different choice of default integrator (implicit_midpoint
instead ofvelocity_verlet
) since RMHMC is typically used for Hamiltonian systems that are not separable.- Parameters:
logdensity_fn – The log-density function we wish to draw samples from.
step_size – The value to use for the step size in the symplectic integrator.
mass_matrix – A function which computes the mass matrix (not inverse) at a given position when drawing a value for the momentum and computing the kinetic energy. In practice, this argument will be passed to the
metrics.default_metric
function so it supports all the options discussed there.num_integration_steps – The number of steps we take with the symplectic integrator at each sample step before returning a sample.
divergence_threshold – The absolute value of the difference in energy between two states above which we say that the transition is divergent. The default value is commonly found in other libraries, and yet is arbitrary.
integrator – (algorithm parameter) The symplectic integrator to use to integrate the trajectory.
- Return type:
A
SamplingAlgorithm
.