a99e4291db7d7f26bf3b689a37f158af80002b25,pymc3/distributions/discrete.py,ZeroInflatedBinomial,logp,#ZeroInflatedBinomial#Any#,691
Before Change
return reshape_sampled(sampled, size, self.shape)
def logp(self, value):
return tt.switch(value > 0,
tt.log(self.psi) + self.bin.logp(value),
tt.log((1. - self.psi) + self.psi * tt.pow(1 - self.p, self.n)))
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
After Change
return reshape_sampled(sampled, size, self.shape)
def logp(self, value):
psi = self.psi
p = self.p
n = self.n
logp_val = tt.switch(value > 0,
logsumexp(tt.log(psi) + self.bin.logp(value)),
logsumexp(tt.log((1. - psi) + psi * tt.pow(1 - p, n))))
return bound(logp_val.sum(),
0 <= value, value <= n,
0 <= psi, psi <= 1,
0 <= p, p <= 1)
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
n = dist.n
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 19
Instances
Project Name: pymc-devs/pymc3
Commit Name: a99e4291db7d7f26bf3b689a37f158af80002b25
Time: 2017-06-01
Author: fonnesbeck@gmail.com
File Name: pymc3/distributions/discrete.py
Class Name: ZeroInflatedBinomial
Method Name: logp
Project Name: pymc-devs/pymc3
Commit Name: a99e4291db7d7f26bf3b689a37f158af80002b25
Time: 2017-06-01
Author: fonnesbeck@gmail.com
File Name: pymc3/distributions/discrete.py
Class Name: ZeroInflatedPoisson
Method Name: logp
Project Name: pymc-devs/pymc3
Commit Name: a99e4291db7d7f26bf3b689a37f158af80002b25
Time: 2017-06-01
Author: fonnesbeck@gmail.com
File Name: pymc3/distributions/discrete.py
Class Name: ZeroInflatedBinomial
Method Name: logp
Project Name: pymc-devs/pymc3
Commit Name: a99e4291db7d7f26bf3b689a37f158af80002b25
Time: 2017-06-01
Author: fonnesbeck@gmail.com
File Name: pymc3/distributions/discrete.py
Class Name: ZeroInflatedNegativeBinomial
Method Name: logp