【发布时间】:2012-12-09 20:49:14
【问题描述】:
我正在编写程序来实现 k-means 聚类。
consider a simple input with 4 vertices a,b,c and d with following edge costs
[vertex1] [vertex2] [edge cost]
a b 1
a c 2
a d 3
b d 4
c d 5
现在我需要让程序运行,直到我得到 2 个集群。
我的疑问是,在计算最小距离的第一步是 a->b(边缘成本 1)。现在我应该将 ab 视为单个集群。如果是这样,ab到c和d的距离是多少?
【问题讨论】:
-
您可能需要考虑使用 k-Harmonic Means(k-Means 的一种变体,利用不同的性能函数),因为它对聚类中心的初始选择不太敏感。
标签: algorithm cluster-analysis graph-algorithm k-means