MM-14 Document clustering (computer-assisted clustering; k-means on document vectors)
Group similar documents without predefined categories using counts or embeddings and produce cluster assignments, centroids and exemplar documents.
What it does
Groups similar documents without predefined categories, using counts or embeddings. Artefact: cluster assignments, centroids and exemplars. Read the exemplars and the documents nearest each boundary.
When to use it
Use when you want to sort a large set of documents into groups of similar content before deciding what the groups mean.
When it does not fit
Needs samples from each cluster that a person can inspect. Misfit: clusters reflect length, source style or language and not subject. Many valid partitions of the same documents exist, so choose by usefulness and validate (the note author's paraphrase of the source, to be checked against the full text).
Result format
The result has a cluster assignment for each document, the centroid of each cluster and exemplar documents for each cluster. It also lists the documents nearest each cluster boundary.
Requirements on the material
| Property | Requirement type | Requirement |
|---|---|---|
| Structure | Applies in some cases | requires=unstructured; requires=semi-structured |
| Content type | Always applies | requires=text |
| Unit of analysis | Always applies | requires=document |
| Level of detail available | Always applies | requires=record-level |
| Amount of material | Applies in some cases | prefers=needs automation |
| Appraises source credibility | Applies in some cases | no |
Not restricted on: Variable types, Time structure, How the sample was chosen, Number of sources, Whether sources can be joined, Known data problems, Producer interest, Source dependence, Origin, Document genre, Language, Personal information, Security classification, Licence.
| Minimum material | enough documents for each cluster to have inspectable samples, usually several hundred |
|---|---|
| Additional sources needed | none |
| Not for (rules) | none |
| Not for (text) | Wrong choice when clusters reflect length, source style or language and not subject. Many valid partitions of the same documents exist, so a partition should be chosen by usefulness and checked. |
Choosing and ordering
| Kind of technique | Primary technique, runs in step 5.3 |
|---|---|
| Phase tag | analyse |
| Other phase tags | none |
| Kind of finding | pattern; difference |
| Question answered | what |
| Strongest statement it supports | describe |
| Needs as input |
|
| Makes as output |
|
| Must exist first | None |
| Loop target | return to analyse |
Library checks by stakes
Each stakes level includes the checks of the level below it. Checks that need a person apply at high stakes only, so the process leaves them out at lower stakes (decision 38). Repeatability: repeatable with fixed settings.
| Stakes | Check | Person involved | Counts as a different method |
|---|---|---|---|
| exploratory | repeat runs | none | no |
| exploratory | spot check | optional | no |
| decision-informing | repeat runs | none | no |
| decision-informing | spot check | optional | no |
| decision-informing | sensitivity analysis | none | no |
| high-stakes | repeat runs | none | no |
| high-stakes | spot check | optional | no |
| high-stakes | sensitivity analysis | none | no |
| high-stakes | second technique with different assumptions | none | conditional |
| high-stakes | independent review | needed | no |
Failure modes and limits
| Model suitability | human judgement required |
|---|---|
| Typical model failure | Summarises each cluster instead of testing whether it is coherent. |
| Error sources | input data; data transformation; statistical assumptions |
| Certainty limits | Certainty drops when clusters follow style or length (indirectness), when partitions differ across settings (inconsistency) and when clusters are not inspected (risk of bias). |
Related techniques
- should follow PE-03 Near-duplicate detection (shingling; MinHash; locality-sensitive hashing; text reuse detection): near-duplicates form clusters of their own and distort sizes
- pairs with MM-15 Computer-assisted theme building (reading-assisted thematic analysis; human-guided topic labelling): a person reads exemplars and names the groups
- pairs with CK-09 Cluster validation indexes (silhouette score; adjusted Rand index; adjusted mutual information; V-measure; stability analysis): validation indexes compare partitions
Evidence and tag basis
Documented. The source describes fully automated and computer-assisted clustering. (Grimmer and Stewart 2013, Political Analysis)
Tag basis: input profile inference; selection inference; sequencing inference; robustness inference. All tag values are inference unless a source is named.