utils.py 文件源码

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

项目:UnsupGAN 作者: VittalP 项目源码 文件源码
def compute_cluster_scores(labels, pred_labels, path):
    assert len(labels) == len(pred_labels)
    rand_score = metrics.adjusted_rand_score(labels, pred_labels)
    nmi_score = metrics.normalized_mutual_info_score(labels, pred_labels)
    with open(path, 'a') as rr:
        rr.write("%4.4f %4.4f\n" % (rand_score, nmi_score))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号