startthat.work home

MM-03 Clustering of records (k-means; hierarchical (agglomerative) clustering; DBSCAN (density-based spatial clustering of applications with noise); HDBSCAN (hierarchical DBSCAN))

Group records by distance or density without predefined categories and produce a cluster label per record, with centroids, a dendrogram or a noise label.

Measure and modelEvidence: DocumentedPrimary technique, runs in step 5.3Strongest statement: describe

What it does

Groups records by distance or density without predefined categories. Artefact: a cluster label per record, centroids or a dendrogram, and a noise label for density-based methods. Read cluster sizes, centroid profiles and stability across restarts.

When to use it

Use when you want to find natural groups among records and have no predefined segments.

When it does not fit

K-means assumes convex, similarly spread clusters and needs the number of clusters in advance. Ward linkage needs Euclidean distance. Density-based clustering needs a distance setting that is hard to choose. Misuse: treating clusters as natural categories when the algorithm always returns the requested number.

Result format

The result has a cluster label for each record, a table of cluster sizes and centroids or a dendrogram, and a noise label where a density-based method was used. It reports the profile of each cluster and its stability across restarts.

Requirements on the material

PropertyRequirement typeRequirement
StructureApplies in some casesrequires=structured
Content typeAlways appliesrequires=tabular
Unit of analysisAlways appliesrequires=record
Variable typesRaises a warningprefers=interval; prefers=ratio
Level of detail availableAlways appliesrequires=record-level
Appraises source credibilityApplies in some casesno

Not restricted on: Time structure, How the sample was chosen, Number of sources, Whether sources can be joined, Amount of material, Known data problems, Producer interest, Source dependence, Origin, Document genre, Language, Personal information, Security classification, Licence.

Minimum materialat least 50 records and two or more variables
Additional sources needednone
Not for (rules)none
Not for (text)Wrong choice when clusters are expected to be treated as natural categories, because k-means always returns the number of clusters requested. Misfit appears when clusters are not convex or have very different spread.

Choosing and ordering

Kind of techniquePrimary technique, runs in step 5.3
Phase taganalyse
Other phase tagsnone
Kind of findingpattern; difference
Question answeredwhat; who
Strongest statement it supportsdescribe
Needs as input
Makes as output
Must exist firstNone
Loop targetreturn 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.

StakesCheckPerson involvedCounts as a different method
exploratoryinput validationnoneno
exploratoryrepeat runsnoneno
decision-informinginput validationnoneno
decision-informingrepeat runsnoneno
decision-informingsensitivity analysisnoneno
high-stakesinput validationnoneno
high-stakesrepeat runsnoneno
high-stakessensitivity analysisnoneno
high-stakessecond technique with different assumptionsnoneconditional
high-stakesindependent reviewneededno

Failure modes and limits

Model suitabilityhuman judgement required
Typical model failureInvents segment descriptions that the centroids do not support, or fits a pattern to noise.
Error sourcesinput data; data transformation; statistical assumptions
Certainty limitsCertainty drops when clusters change across restarts, algorithms or scaling choices (inconsistency) and when cluster labels are read as real categories (indirectness).

Evidence and tag basis

Documented. The documentation states that k-means inertia "assumes that clusters are convex and isotropic". (scikit-learn clustering)

Tag basis: input profile inference; selection inference; sequencing inference; robustness inference. All tag values are inference unless a source is named.