There were *divergences after tuning. Increase `target_accept` or reparameterize. & The number of effective samples is smaller than 10% for some parameters

There may be multiple issues at play here. For example, I would advise against using uniform priors over alpha and beta. But the critical piece seems to be the parameters being passed into pm.BetaBinomial(). Passing n, alpha, and beta in as positional arguments requires knowing the assumed positions (which the documentation doesn’t provide). I think this should help:

z = pm.BetaBinomial('z', n=7, alpha=alpha, beta=beta, observed=data)
1 Like