【发布时间】:2015-04-05 08:22:54
【问题描述】:
我正在学习 python scikit。 这里给出的例子 显示每个集群中出现次数最多的单词,而不是集群名称。
http://scikit-learn.org/stable/auto_examples/document_clustering.html
我发现 km 对象有“km.label”,其中列出了质心 id,即数字。
我有两个问题
1. How do I generate the cluster labels?
2. How to identify the members of the clusters for further processing.
我具备 k-means 的工作知识并了解 tf-ids 概念。
【问题讨论】:
-
我遇到了同样的问题。假设您有一个由 38 个观测值(行)和 5 个特征(列)组成的数据集。您需要 19 个集群。例如,在 kmeans 聚类之后,您如何知道观察 24 (row=24) 属于聚类 5?
标签: python machine-learning scikit-learn cluster-analysis k-means