Classification learned the Reuters categories from stories that editors had labeled. Suppose nobody had labeled anything. Could a program still find the groups in 7,487 news stories, and would they be groups a person would recognize? It finds groups, and only some of them are the editors'. The tightest of ten k-means clusterings split the earnings reports four ways by their wording and put most of four small categories together in one cluster.
Clustering is the task of grouping documents by similarity, with no categories given in advance. It finds groups of documents more similar to one another than to the rest, and leaves people to decide what the groups mean. Clustering is the most common form of unsupervised learning in text processing, because unlabeled text is plentiful and labels are expensive.
Clustering serves retrieval in several ways:
- it can organize a result list into topics, giving a searcher an overview of an ambiguous query;
- it can structure a collection for browsing;
- it can speed up or improve retrieval by searching clusters instead of individual documents.
All of these rest on the cluster hypothesis: documents similar to each other tend to be relevant to the same needs.
Here is the route. First we test the cluster hypothesis on the relevance judgments of the Cranfield collection. Then we build k-means, the central algorithm, and trace it by hand on six points. Next we face the decisions k-means leaves open (where to start, how many clusters, which vectors) and name the clusters it finds. Then we replace centroids with probability distributions, fit them with the EM algorithm, and recover k-means as a limit. After that we establish how to tell whether a clustering is any good. Finally we build a tree of clusters instead of a flat set. Two datasets run through the unit: Cranfield for the hypothesis, and six categories of Reuters-21578 news stories for every experiment after it. A final article examines the reviewer clustering from my course project.
Articles
The idea
- Clustering and the cluster hypothesis: documents that look alike tend to be relevant to the same queries, far more often than chance but far from always. What clustering is for, hard and soft, flat and hierarchical clustering, cluster-based smoothing and cluster pruning, and the cluster hypothesis tested on Cranfield: nearest neighbors, similarity distributions, one query traced, k-means clusters, and cluster pruning measured.
K-means and mixture models
- The k-means algorithm: two alternating steps that each lower one objective, and therefore must stop, though not always at the best clustering. The objective, the two steps, six points traced by hand, the proof that each step lowers RSS, empty clusters and ties, local minima for every pair of seeds, an interactive demo, its cost, and worked problems.
- K-means in practice: the starting points, the number of clusters and the vectors each change what k-means finds, measured on Reuters. Initialization and restarts, k-means++ worked out exactly on small examples, cluster labels by centroid weight and by mutual information, choosing K and the AIC penalty derived, feature scaling, and spherical k-means with its convergence proof.
- Model-based clustering and the EM algorithm: clustering as fitting a mixture of probability distributions, which gives each document a degree of membership in every cluster. The EM algorithm derived from a lower bound, the proof that the likelihood never decreases, Gaussian and Bernoulli mixtures, k-means as the limit of a shrinking variance, local maxima and the unbounded Gaussian likelihood, on six points, eleven documents and Reuters.
Judging and comparing
- Evaluating clusterings: with no right answer, a clustering is graded against classes chosen by people, and each measure rewards something different. Internal and external criteria, the silhouette, purity, normalized mutual information, the V-measure, the Rand index and the F measure, computed step by step on the textbook's example.
- Clustering measures corrected for chance: subtracting what a random clustering of the same sizes would score gives measures that are 0 for chance and for degenerate clusterings. The adjusted Rand index with its chance model derived, adjusted mutual information, what every measure makes of singletons, one cluster and random clusterings, and the measures on Reuters for 2 to 50 clusters.
- Hierarchical clustering: a tree of clusters in place of a fixed number, built by repeatedly merging the two closest clusters. Agglomerative clustering traced by hand under single, complete, average, and centroid linkage, dendrograms and where to cut them, chaining and outliers, divisive clustering, and a comparison with k-means on 30 samples of Reuters stories.
- Linkage properties of agglomerative clustering: the behavior of a hierarchical clustering follows from how its linkage updates distances after a merge. The update rules, the proof that merge heights never decrease, the group-average vector-sum formula, centroid inversions, single linkage as a minimum spanning tree, the priority-queue algorithm and best-merge persistence.
A project
- Clustering Goodreads reviewers: the reviewer features, the five clusters, and how review length shaped them.
Related topics
- Text classification solves the supervised version of the same problem.
- Cosine similarity provides the similarity measure most text clustering uses.
- Search applications describes clustering of search results and topic detection.
- Topic modeling generalizes clustering by letting a document belong partly to several topics.
Course materials
The reviewer clustering in our term project, written by my partner James R. Brown, is in the Goodreads repository. The experiments on Reuters and Cranfield were written for this site.
References
- Manning, C. D., Raghavan, P., and Schütze, H. (2008). Introduction to Information Retrieval, chapters 16–17. Cambridge University Press. record · 102 pages
- Jain, A. K. (2010). Data clustering: 50 years beyond K-means. Pattern Recognition Letters, 31(8), 651–666. record
Reviewed: verified, 16 Nov 2026 · citations checked, 16 Nov 2026 · editorial review, 16 Nov 2026 · 9 revisions