Math 2.0

Statistics Definition

k-means clustering

Builds on Cluster analysisPartition of a setEuclidean distance

Definition

Let x1,…,xn∈ℝdx_1, \ldots, x_n \in \R^d and let 1≤k≤n1 \le k \le n. For a partition of {1,…,n}\set{1, \ldots, n} into non-empty sets S1,…,SkS_1, \ldots, S_k, let mj=1∣Sj∣∑i∈Sjxim_j = \frac{1}{\abs{S_j}} \sum_{i \in S_j} x_i be the mean of cluster jj. The kk-means problem is to find a partition that minimises the within-cluster sum of squares W(S1,…,Sk)=∑j=1k∑i∈Sj∣xi−mj∣2,W(S_1, \ldots, S_k) = \sum_{j=1}^k \sum_{i \in S_j} \abs{x_i - m_j}^2, where ∣⋅∣\abs{\cdot} is the Euclidean norm. kk-means clustering is the clustering given by a solution, or by an approximate solution, of this problem.

Remarks

Lloyd's algorithm starts from kk centres and repeats two steps: assign each xix_i to a nearest centre, then replace each centre by the mean of its assigned points. Neither step increases WW, and there are finitely many partitions, so the algorithm stops after finitely many steps, at a local minimum that need not be global. Example: for 0,1,10,11∈ℝ0, 1, 10, 11 \in \R and k=2k = 2, the partition {0,1},{10,11}\set{0, 1}, \set{10, 11} has means 0.50.5 and 10.510.5 and W=4⋅0.25=1W = 4 \cdot 0.25 = 1. Non-example: the partition {0},{1,10,11}\set{0}, \set{1, 10, 11} has means 00 and 22/322/3 and W=546/9≈60.7W = 546/9 \approx 60.7, so it is not a solution. The mean is used because, for fixed clusters, mjm_j is the point cc that minimises ∑i∈Sj∣xi−c∣2\sum_{i \in S_j} \abs{x_i - c}^2.

Reading path

To understand this page from the ground up, read these 4 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Cluster analysis concept
  2. Euclidean distance concept
  3. Partition of a set concept
  4. k-means clustering definition

Further reading

  1. Web https://en.wikipedia.org/wiki/K-means_clustering
About this page
TagPNF97STBAW
URIm2://PNF97STBAW
Kinddefinition
WritingW0 stub
MSC62H30
Definesk-means clustering
UsesCluster analysis, Partition of a set, Euclidean distance

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.