lindermanlab / ssm-jax

Bayesian learning and inference for state space models (SSMs) using Google Research's JAX as a backend
MIT License
57 stars 7 forks source link

Gibbs sampling for HMM #30

Open slinderman opened 2 years ago

slinderman commented 2 years ago

HMMs with exponential family emissions admit a simple Gibbs sampling algorithm: alternate between the following two steps:

  1. Sample the discrete latent states given the parameters and data using HMMPosterior.sample()
  2. Sample the parameters from their conditional distribution given the latent states and data. This will follow the same recipe as the ExponentialFamilyEmissions.m_step(), but it will use conditional.sample() instead of conditional.mode().