Skip to content

Instantly share code, notes, and snippets.

@petrushev
Created October 1, 2019 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petrushev/4327f0a07b85ed89886dfabc4397d50c to your computer and use it in GitHub Desktop.
Save petrushev/4327f0a07b85ed89886dfabc4397d50c to your computer and use it in GitHub Desktop.
with pm.Model() as m2:
p = pm.Dirichlet('p', np.ones(8) / 8., shape=8,
testval=np.ones(8) / 8.)
N = pm.Bound(pm.Poisson, lower=data.sum())('N', mu=8*mean_)
succ = pm.Multinomial('succ', n=N, p=p, observed=data)
m2.name = 'm2'
m2.trace = pm.sample(5000, tune=5000, chains=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment