gDirichlet.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:PyBGMM 作者: junlulocky 项目源码 文件源码
def gdir_pdf_integ(self, alpha1, alpha2, alpha3):
        from math import gamma
        from operator import mul
        alpha = np.array([alpha1, alpha2, alpha3])
        coef1 = gamma(np.sum(alpha)) / reduce(mul, [gamma(a) for a in alpha])
        coef2 = reduce(mul, [xx ** (aa - 1)
                             for (xx, aa) in zip(self.x, alpha)])

        coef3 = reduce(mul, [self.gamma_dist.pdf(local) for local in alpha])
        return coef1 * coef2 * coef3
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号