posterior.py 文件源码

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

项目:mitre 作者: gerberlab 项目源码 文件源码
def log_multinomial_coefficient(list_of_tuples):
    counts = dict.fromkeys(set(list_of_tuples),0)
    for t in list_of_tuples:
        counts[t] += 1
    N = len(list_of_tuples)
    v = np.array(counts.values())
    return gammaln(N+1)-np.sum(gammaln(v+1))


####
# Parameters (this should be made user-configurable later)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号