Content deleted Content added
Undid revision 243371440 by 59.92.88.244 (talk) |
This article is written in an unnecssarily hard to understand manner. I updated it with material form the kmeans article. Recommend merge/swap them. |
||
Line 1:
In [[computer
Lloyd's algorithm is usually used in a [[Euclidean space]], so the distance function serves as a measure of similarity between points, and averaging of each dimension for the averaging.
Lloyd's algorithm starts by partitioning the input points into k initial sets, either at random or using some [[heuristic]]. It then calculates the average point, or centroid, of each set via some metric (usually averaging dimensions in [[Euclidean space]]. It constructs a new partition by associating each point with the closest centroid, usually using the [[Euclidean distance]] function. Then the centroids are recalculated for the new clusters, and algorithm repeated by alternate application of these two steps until convergence, which is obtained when the points no longer switch clusters (or alternatively centroids are no longer changed).
More formally:
Lloyd's algorithm starts with an initial distribution of samples or points and consists of repeatedly executing one relaxation step:
|