8b2386af1bd7cd3a65bfdaba8633864029ec257a,examples/speedtest_pymc3.py,,,#,38

Before Change


p = Var("p", Beta(1,1))

// Latent variable for occupancy
z = Var("z", Bernoulli(p) , y.shape, dtype = "int8")

// Estimated mean count
theta = Var("theta", Uniform(0, 100))

// Poisson likelihood



Data(y, ZeroInflatedPoisson(theta, z))


point = model.test_point

After Change


y = array([(random.random()<pi) * random.poisson(theta) for i in range(n)])

model = Model()
with model:
// Estimated occupancy
    p = Beta("b", 1,1)

// Latent variable for occupancy
    z = Bernoulli("z", p , shape = y.shape)

// Estimated mean count
    theta = Uniform("theta", 0, 100)

// Poisson likelihood
    z = ZeroInflatedPoisson("z", theta, z)


point = model.test_point

_pymc3_logp = model.logpc
def pymc3_logp():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

Instances


Project Name: pymc-devs/pymc3
Commit Name: 8b2386af1bd7cd3a65bfdaba8633864029ec257a
Time: 2013-04-07
Author: jsalvatier@gmail.com
File Name: examples/speedtest_pymc3.py
Class Name:
Method Name:


Project Name: pymc-devs/pymc3
Commit Name: 8b2386af1bd7cd3a65bfdaba8633864029ec257a
Time: 2013-04-07
Author: jsalvatier@gmail.com
File Name: examples/stochastic_volatility.py
Class Name:
Method Name:


Project Name: pymc-devs/pymc3
Commit Name: 8b2386af1bd7cd3a65bfdaba8633864029ec257a
Time: 2013-04-07
Author: jsalvatier@gmail.com
File Name: examples/latent_occupancy.py
Class Name:
Method Name: