Beispiel #1
0
 def logp(self, F, Y):
     mean = self.invlink(F)
     alpha = mean * self.scale
     beta = self.scale - alpha
     return logdensities.beta(Y, alpha, beta)
Beispiel #2
0
def test_beta(x, alpha, beta):
    gpf = logdensities.beta(x, alpha, beta).numpy()
    sps = scipy.stats.beta(a=alpha, b=beta).logpdf(x)
    np.testing.assert_allclose(gpf, sps)