Closed thomas-haslwanter closed 5 years ago
The shape of pm.sample_posterior_predictive is wrong. For example, the code
data = np.random.randn(100) with pm.Model() as model: mu = pm.Normal('mu', mu=0, sd=1) sd = pm.HalfNormal('sd', sd=1) obs = pm.Normal('obs', mu=mu, sd=sd, observed=data) trace = pm.sample() with model: post_pred = pm.sample_posterior_predictive(trace, samples=500, size=5) post_pred['obs'].shape
produces
(500, 5, 100)
instead of the expected (500, 5)
You probably meant to open this here instead: https://github.com/pymc-devs/pymc3
The shape of pm.sample_posterior_predictive is wrong. For example, the code
produces
instead of the expected (500, 5)