Machine learning

K-means clustering: assign, update, repeat

K-means looks for \(k\) centroids \(\mu_1, \dots, \mu_k\) that make the total squared distance \(\sum_i \lVert x_i - \mu_{c(i)} \rVert^2\) small, where \(c(i)\) is the centroid nearest to point \(x_i\). It alternates two steps: assign every point to its nearest centroid, then move every centroid to the mean of its points. Neither step can raise the total, so it always stops, though not always at the best answer. Every run in the film is computed in the page.

Helios · more films →