_chains#
- cultivars.engine._internals._chains = <module 'cultivars.engine._internals._chains' from '/home/runner/work/cultivars/cultivars/src/cultivars/engine/_internals/_chains.py'>[source]#
Markov chains over the parameters of a nonlinear state-space model.
The particle filter returns an unbiased estimate of the likelihood, and Andrieu, Doucet, and Holenstein (2010) showed that plugging that estimate into a Metropolis-Hastings acceptance ratio – one fresh estimate per proposal, the current one carried rather than recomputed – leaves the exact posterior invariant. That is the particle marginal Metropolis-Hastings sampler implemented here, and it is the one estimator in the package that is honest for a model outside the additive-Gaussian form: no linearization, no mixture approximation, and the Monte Carlo error of the likelihood estimate enters as extra stickiness of the chain rather than as bias.
The chain moves in an unconstrained parameterization supplied by the caller (the same reparameterizations the deterministic objectives use), with a Gaussian random walk whose covariance adapts during burn-in (Haario, Saksman, and Tamminen, 2001) and whose global scale is tuned toward a target acceptance rate. Adaptation stops at the end of burn-in, so the kept draws come from a fixed-kernel chain.
References
- Andrieu, C., Doucet, A., & Holenstein, R. (2010). Particle Markov
chain Monte Carlo methods. Journal of the Royal Statistical Society B, 72(3), 269-342.
- Haario, H., Saksman, E., & Tamminen, J. (2001). An adaptive Metropolis
algorithm. Bernoulli, 7(2), 223-242.
- Pitt, M. K., dos Santos Silva, R., Giordani, P., & Kohn, R. (2012). On
some properties of Markov chain Monte Carlo simulation methods based on the particle filter. Journal of Econometrics, 171(2), 134-151.