Clustering groups similar cases without labels
Clustering partitions examples according to a representation and a notion of similarity. It does not discover an objective set of natural categories. Change features, scaling, distance, or algorithm and the groups may change, so every cluster is a model output that needs evidence.
Purpose comes before distance
A grouping may propose customer segments, organize documents, expose operating states, or create downstream features. Define which decision or investigation it supports before choosing a metric. A mathematically tidy partition that changes no action is decoration.
K-Means looks for compact centroid groups
K-Means works best for roughly compact, similarly scaled clusters represented by centroids. Standardize features when units differ, use multiple initializations, and consider MiniBatchKMeans when full fitting is too expensive.
Density methods can leave noise unclustered
DBSCAN and HDBSCAN find dense regions rather than requiring K centroids. They can represent irregular shapes and leave sparse points unassigned, but distance scale, neighborhood parameters, and varying density strongly affect the result.
Agglomerative clustering exposes hierarchy
Agglomerative methods merge nearby groups from the bottom up. On modest datasets, a dendrogram can help explain how clusters relate. Linkage and distance choices determine what “nearby” means and must be part of the result.
Choose K with curves, stability, and use
Inspect inertia and silhouette over plausible K values without treating an elbow as ground truth. Repeat across seeds or resamples and connect K to operating capacity: ten statistically neat segments are useless if the team can support only three. For density methods, tie min_cluster_size to the smallest meaningful group.
Read original cases before naming a cluster
Inspect representative and boundary examples, profile groups on variables not used to create them, and check stability over time. Guard against leakage and proxies for protected attributes. Name a segment only after its members share a defensible pattern and the grouping supports a concrete action.