Behrens' Bayesian Learner Model : How to share parameters between steps?

Regarding Scan, you cannot use it to create new variables as in the code snippet you shared (you might in a future PyMC3 version though).

By the way, do you want to share the STAN code?

For HMMs in general, there are some more specialized libraries built on top of PyMC3 with custom Distributions and samplers such as GitHub - AmpersandTV/pymc3-hmm: Hidden Markov models in PyMC3 that might be easier work with.

1 Like