I have a simple probabilistic model with Beta prior and Bernoulli likelihood:
with pm.Model() as model:
mu = pm.Beta('mu', alpha=2.0, beta=2.0)
x = pm.Bernoulli('x', p=mu, observed=x_obs)
trace = pm.sample(1000)
my observed value x_obs
is of shape (8,)
, so when I sample from sample_posterior_predictive()
, I always get samples with the same size:
samples = pm.sample_posterior_predictive(trace, samples=10000, model=model)
samples['x'].shape
>>> (10000, 8)
How can I sample n different Bernoulli draws other than 8? For example with shape= (10000, n)?