I’m trying to predict the passenger flow in a bus route using particle filter.So while doing the bayesian part using pymc3, I tried to compute the posterior predictive plot.This is snippet of my code.
with pm.Model() as model_particle:
θ = pm.Gamma(‘θ’, 65, 19)
y = pm.Poisson(‘y’, θ, observed=data)
trace = pm.sample(2500,tune=5000)
Please post a backtrace, so we can see where the error is. Is it in az.plot_ppc or earlier?
Also, please reformat the code in your post using the preformatted layout operation – we can’t see what parts of the code are inside the with pm.Model() as model_particle: and which are outside, because the indentation has been lost.
I’m suspicious that this might be an old version of the library, because an up-to-date version would complain if particle_model wasn’t visible to az.from_pymc3.