Kernels

Kernels#

Goose makes it easy for you to combine different MCMC kernels for different blocks of model parameters. You can also define your own kernel by implementing the Kernel protocol.

To draw samples from your posterior, you will want to call sample_all_epochs. Once sampling is done, you can obtain the results with get_results, which will return a SamplingResults instance.

IWLSKernel

An IWLS kernel with dual averaging and an (optional) user-defined function for computing the Cholesky decomposition of the Fisher information matrix, implementing the Kernel protocol.

NUTSKernel

A NUTS kernel with dual averaging and an inverse mass matrix tuner, implementing the Kernel protocol.

HMCKernel

A HMC kernel with dual averaging and an inverse mass matrix tuner, implementing the Kernel protocol.

RWKernel

A random walk kernel.

MHKernel

A Metropolis-Hastings kernel implementing the Kernel protocol.

MHProposal

Encapsulates a proposed state and the log-correction for a Metropolis-Hastings transition.

GibbsKernel

A Gibbs kernel implementing the Kernel protocol.