Clustering
Clustering is an unsupervised machine learning technique that sorts data points into groups so that items in the same group are more similar to each other than to items in other groups.
Clustering, or cluster analysis, finds groups in data that nobody labelled in advance. Google's machine learning course describes it as an unsupervised method that sorts unlabelled examples by how similar they are; if the examples already had labels, the same task would be classification. What counts as similar is up to the analyst, who chooses which features to compare and how to measure distance between them.
There are several families of method. Hierarchical clustering links nearby points step by step and is often drawn as a tree called a dendrogram. Centroid methods such as k-means represent each cluster by its centre, and the number of clusters, k, is usually chosen beforehand. Distribution methods model each cluster as a statistical distribution, as Gaussian mixture models do. Density methods such as DBSCAN treat clusters as crowded regions and label isolated points as noise.
The idea predates computers. The anthropologists Driver and Kroeber introduced cluster analysis in anthropology in 1932, Joseph Zubin and Robert Tryon brought it to psychology in 1938 and 1939, and Raymond Cattell used it from 1943 to classify personality traits.
Uses listed in Google's course include market segmentation, social network analysis, grouping search results, medical imaging, image segmentation and anomaly detection. Google gives the example of a medical study in which patients are grouped by how often and how severely they have symptoms, so that people who respond to a treatment in similar ways fall into the same cluster. Replacing many features with a single cluster ID can also shrink data and, if each cluster holds enough people, give some privacy protection.
There is no objectively correct clustering. The right algorithm depends on the data and on what the groups are for, and it is usually found by trial and error. Measures such as the silhouette score show how tight and separate the clusters are, but not whether they mean anything. A set of customer segments is a starting point for a person to interpret, not a finding in itself.
Clustering is a way of grouping unlabelled data so that similar items end up together. It is a form of unsupervised learning: the algorithm is not told what the groups should be, only how to measure similarity, and it works out the groups from the data. Classification assigns items to categories that are already defined, learning from labelled examples. Clustering has no labels and discovers groups on its own. Google's course puts it simply: if the data were labelled, the grouping task would be classification. Well-known methods include k-means, which groups points around a chosen number of centres, hierarchical clustering, which builds a tree of nested groups, Gaussian mixture models, which treat clusters as statistical distributions, and DBSCAN, which finds dense regions and labels sparse points as noise. Internal measures such as the silhouette score show whether clusters are compact and well separated, and clusters can be compared with known labels where they exist. In the end, though, a clustering is good if the groups are useful for the purpose at hand, which takes human judgement.Common questions
What is clustering in machine learning?
What is the difference between clustering and classification?
What are the most common clustering algorithms?
How do you know if a clustering is good?
Search for "cluster analysis", "k-means vs DBSCAN" or "hierarchical clustering dendrogram" to compare methods. Reliable sources include Google's clustering course, the documentation of libraries such as scikit-learn and statistics textbooks. Treat claims that a clustering has revealed natural types of customers or people with care, since a different algorithm or set of features can produce quite different groups from the same data.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.