State Space Models in PyMC

One thing I didn’t understand first looking at the output graphs was that the PyMC state estimates are much closer to the smoothed Kalman states than to the filtered ones. In principal, this should not be the case, since there’s no integration of future information into the PyMC model.

The way you’ve written the generative AKA forward model is one-step-at-a-time from past to present, but the inference in PyMC is indeed making use of all future knowledge to infer the innovations / shocks at any single point in time.

1 Like