tp2_solutions.py 文件源码

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

项目:TPs 作者: DataMiningP7 项目源码 文件源码
def ex2_kmeans(X, y):
    """ Applies the KMeans algorithm on X, y using K=10 and print the
    silhouette score of this model. X and y are returned by transform_text
    above.
    """
    model = KMeans(10).fit(X, y)
    print "Silhouette score: %f" % metrics.silhouette_score(X, model.labels_)

# Ex 3
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号