kmeans.py 文件源码

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

项目:modernpython 作者: rhettinger 项目源码 文件源码
def quality(labeled: Dict[Centroid, Sequence[Point]]) -> float:
    'Mean value of squared distances from data to its assigned centroid'
    return mean(dist(c, p) ** 2 for c, pts in labeled.items() for p in pts)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号