def get_global_entropy(glmm_par):
    info_mu = glmm_par['mu']['info'].get()
    info_beta = glmm_par['beta']['info'].get()
    tau_shape = glmm_par['tau']['shape'].get()
    tau_rate = glmm_par['tau']['rate'].get()

    return \
        ef.univariate_normal_entropy(info_mu) + \
        ef.univariate_normal_entropy(info_beta) + \
        ef.gamma_entropy(tau_shape, tau_rate)
示例#2
0
 def test_gamma_entropy(self):
     shape = 3.0
     rate = 2.4
     gamma_dist = sp.stats.gamma(a=shape, scale=1 / rate)
     self.assertAlmostEqual(gamma_dist.entropy(),
                            ef.gamma_entropy(shape, rate))
示例#3
0
 def entropy(self):
     return ef.gamma_entropy(
         shape=self['shape'].get(), rate=self['rate'].get())