Hi,
I have an array of 413 integers ranging from 0 to 6.
`np.unique(dist, return_counts=True)`
(array([0., 1., 2., 3., 4., 5., 6.]),
array([144, 125, 93, 34, 12, 4, 1]))
I’d like to model this with a beta binomial distribution:
with pm.Model() as model:
alpha = pm.Uniform('alpha', lower=0, upper=50)
beta = pm.Uniform('beta', lower=0, upper=50)
z = pm.BetaBinomial('z',7,alpha,beta,observed=dist -1, shape=(413))
trace= pm.sample(17000, tune=1500,init='adapt_diag', chains=4, cores=4, max_treedepth=50, target_accept=.60)
When I run this example I always get:
There were 1113 divergences after tuning. Increase `target_accept` or reparameterize.
There were 794 divergences after tuning. Increase `target_accept` or reparameterize.
There were 400 divergences after tuning. Increase `target_accept` or reparameterize.
There were 590 divergences after tuning. Increase `target_accept` or reparameterize.
The number of effective samples is smaller than 10% for some parameters.
Also alpha does not seem to converge.
What am I doing wrong?