0

I'm trying to implement k means clustering.

I've a set of points with coordinates (x,y) and i am using Euclidean distance for finding distance. I've computed distance between all points in a matrix

dist[i][j] - distance between points i and j

when i choose a[1][3] farthest from pt 1 as 3.

then when i search farthest from 3 i may get a[3][j] but a[1][j] may be minimum.

[pt j is far from pt3 but near to 1]

so how to choose k farthest points using the distance matrix.

4

1 回答 1

0

请注意,最远的 k 点不一定会产生最佳结果:它们显然不是最佳的聚类中心估计。

另外,由于 k-means 启发式可能会陷入局部最小值,因此您将需要一种随机算法,该算法允许您多次重新启动该过程并获得潜在的不同结果

您可能想查看 k-means++,它是 k-means 初始化的已知良好启发式方法。

于 2013-09-03T06:16:46.783 回答