There is a newer version of the record available.

Published June 19, 2024 | Version v1.0.0
Software Open

CKrawczyk/MultiHMCGibbs: v1.0.0

Description

An HMC-within-Gibbs sampler for Numpyro

This package adds a new HMC-within-Gibbs sampler to Numpyro. Unlike the HMCGibbs sampler currently available, this sampler is for situations where you do not have an analytic form for one of your conditioned distributions. Instead, it uses an HMC/NUTS sampler to estimate draws from each of the conditioned distributions.

To use MultiHMCGibbs you need to create a list of HMC or NUTS kernels that wrap the same model, but each can have its own keywords such as target_accept_prob or max_tree_depth. The other argument is a list of lists containing the free parameters for each of the inner kernels.

Internally the sampler will:

  1. Loop over the kernels in the list
  2. Conditioned it on the non-free parameters
  3. Re-calculate the likelihood and gradients at the new conditioned point
  4. Step the kernel forward
  5. Move on to the next kernel

Files

CKrawczyk/MultiHMCGibbs-v1.0.0.zip

Files (253.9 kB)

Name Size Download all
md5:eb5fe1f5364e503592c6fb74aa60636e
253.9 kB Preview Download

Additional details

Related works