Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for inhomogeneous parameters in LinearGaussianConjugateSSM.fit_blocked_gibbs #403

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hylkedonker
Copy link

@hylkedonker hylkedonker commented Mar 2, 2025

This PR aims to address #402. In brief, add support for inhomogeneous (i.e., time-varying) parameter Gibbs sampling in the linear Gaussian conjugate state space model LinearGaussianConjugateSSM.
The primary code change in LinearGaussianConjugateSSM.fit_blocked_gibbs is this:

  • Compute the summary statistics per time point $t$.
  • Sample the the parameters
    • Inhomogeneous model: Sample a separate $[F_t, B_t, b_t]^T$ and $[H_t, D_t, d_t]^T$ from a multivariate normal inverse Wishart (MNIW) posterior for each time point $t$.
    • Homogeneous (steady-state) model: Aggretate the summary statistics from all time points, then sample $[F, B, b]^T$ and $[H, D, d]^T$ from the MNIW.
  • Includes a (fairly trivial) unit test that checks the sampled shapes. (A more comprehensive Markov chain Monte Carlo test would involve simulation based calibration, but these take too long to be included in a test suite.)

Scope:

  • Currently, uses the same multivariate normal inverse Wishart prior for all time points.
  • Either considers all dynamics and emissions weights and biases as time-dependent, or all time-independent. For instance, this PR doesn't yet provide support for time-independent emissions with time-dependent dynamics (or vice versa).
  • Algorithms other than fit_blocked_gibbs -- e.g., EM -- are out of scope of this PR.

Let me know if this looks good, or if you require any modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant