Clustering splits unlabeled data points into groups, so that points in the same group are similar to each other. It is a core task of unsupervised learning, since no labels tell the algorithm what the groups should be. K-means gives each point exactly one cluster. A Gaussian mixture model gives each point a probability for each cluster and models the density of the data. Hierarchical clustering builds a tree of merges, which gives a clustering for every number of clusters.

Prerequisites

Contents

  • 6.1. K-Means: Lloyd’s algorithm, convergence to a local minimum, k-means++ seeding, choosing , feature scaling, and the link to mixtures.
  • 6.2. Gaussian Mixture Models: responsibilities, the EM updates, covariance structures, collapsing components, and choosing with BIC.
  • 6.3. Hierarchical Clustering: agglomerative merging, the dendrogram, linkage choices, cutting the tree, and clustering assets by correlation.

Read 6.1. K-Means first, since its two alternating steps reappear as the E-step and M-step of a mixture model. Then read 6.2. Gaussian Mixture Models, and read 3.11.5 EM Algorithm for the proof that EM never lowers the likelihood. Read 6.3. Hierarchical Clustering when the number of clusters is unknown. For data with many features, read 7.1. Principal Component Analysis and 7.2. Curse of Dimensionality, since distances lose contrast in high dimensions. 9.4. Bag of Visual Words applies k-means in computer vision.