Issues with sample_posterior_predictive?

Simply trying to sample from the posterior predictive on my pre-defined model, using

ppc = pm.sample_posterior_predictive(trace, samples=500, model=model)

and I get the error

AttributeError: 'module' object has no attribute 'sample_posterior_predictive'

What’s going on?

pymc3 is imported as pm.

It has been changed to pm.sample_ppc()

Actually it is the other way around, sample_ppc has been changed to sample_posterior_predictive, but it is not in the newest release yet. You can either upgrade to master, or use sample_ppc until the next release.

Oh okay. Good to know. :slight_smile:

1 Like