【发布时间】:2014-10-01 09:04:06
【问题描述】:
我正在查看Scikit Kmeans digit example 上给出的示例代码
此脚本中有以下代码:
# in this case the seeding of the centers is deterministic, hence we run the
# kmeans algorithm only once with n_init=1
pca = PCA(n_components=n_digits).fit(data)
bench_k_means(KMeans(init=pca.components_, n_clusters=n_digits, n_init=1),
name="PCA-based",
data=data)
为什么将特征向量用作初始中心,对此有什么直觉吗?
【问题讨论】:
标签: scikit-learn k-means pca