예제 #1
0
 def logp(self, F, Y):
     return logdensities.gamma(Y, self.shape, self.invlink(F))
예제 #2
0
def test_gamma(x, shape, scale):
    gpf = logdensities.gamma(x, shape, scale).numpy()
    sps = scipy.stats.gamma(a=shape, loc=0.0, scale=scale).logpdf(x)
    np.testing.assert_allclose(gpf, sps)