[WIP] Add GammaGaussianHMM, LinearHMM, GaussianMRF and LinearHMMReparam - #2274
juanitorduz wants to merge 16 commits into
Conversation
Benchmark reportthis PR - run time: 2 slower, 1 faster
- compile time: 1 slower, 0 fasterSignificant changes (4) ──────── run time ──────── ────── compile time ──────
benchmark baseline this PR Δ baseline this PR Δ
───────────────────────────────────────────────────────────────────────────────────────────
+ gamma_log_prob 1.5 ms 1.4 ms -6.4% 2.16 s 2.00 s -7.5%
- lkj_cholesky_sample 4.2 ms 4.4 ms +6.1% 845.0 ms 841.5 ms -0.4%
- initialize_model_hierarchical 28.4 ms 31.3 ms +10.0% 3.26 s 3.19 s -2.0%
- predictive_forward_sampling 531.7 ms 541.2 ms +1.8% 116.9 ms 147.2 ms +25.8%Red is slower, green is faster; a row is coloured by the worse of its two columns. A delta in parentheses cleared the threshold on a measurement below the resolution floor, so it is shown without being called a change. † marks a benchmark that could not be compared — see below. Full results
|
| baseline | this PR | |
|---|---|---|
| ref | master |
feat/gaussian-hmm-family |
| commit | 07501df3 |
911baab5 |
| numpyro | 0.21.0 | 0.21.0 |
| jax | 0.11.1 | 0.11.1 |
| backend | cpu | cpu |
| python | 3.14.7 | 3.14.7 |
Runner: Linux-6.17.0-1022-azure-x86_64-with-glibc2.39, 4 CPUs.
Produced by this benchmark run.
5eb2a1e to
911baab
Compare
…rHMMReparam; accept expanded Gamma priors
…sform checks, MRF normalizer once; Sphinx docstrings
…d Schur marginalization
…MM wrappers and GammaGaussian edge cases
…rs, export is_gaussian_noise
911baab to
7151fdd
Compare
Stacked on #2273: this PR targets its branch, so the diff shows only the additions on top of it.
Completes the Pyro HMM family:
numpyro.ops.gamma_gaussianandGammaGaussianHMM(Student-t marginal withfilter), sampling-onlyLinearHMM, pairwise-factorGaussianMRF, plusStudentTReparamandLinearHMMReparamto marginalize heavy-tailed noise exactly throughGaussianHMM.Verified against fixed-scale Gaussian identities, unrolled Student-t and MRF oracles, closed-form Gamma posteriors, and a NUTS smoke test with Student-t transition noise.