Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import theano
import theano.tensor as tt
import numpy as np
import pymc3 as pm
x = np.asarray([0,1])
import numpy as np
test_values = np.arange(32752, 32772, 1);
for v in test_values:
model = pm.Model();
with model:
mu = pm.Normal("mu", mu=0, sd=10);
Y = pm.NegativeBinomial("Y", mu=2**mu, alpha=10, observed=v)
Z = pm.Poisson('Z', mu=2**mu, observed=v)
for RV in model.basic_RVs:
if in ["Y","Z"]:
print(v, RV.logp(model.test_point));
factln = pm.distributions.dist_math.factln
n = 32768 + 10
k = 32768
for val in [factln(n), factln(k), factln(n - k)]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment