Skip to content

Clustering

Grouping data points so that points in the same group are more similar to each other than to points in other groups, without any labels.

Also cluster analysis

Fig. / How it works
SIMILAR POINTS END UP IN THE SAME GROUP
Role · kind
Models and algorithmsFamily
Level
Beginner

Sorting a pile of socks into pairs and colors without anyone telling you what colors exist.

Where it fits

+All relationships as a list

See it on the full map

How it works

Clustering is the most common unsupervised task. Different algorithms define “a group” differently:

  • Centroid-based: each cluster has a center; points join the nearest one. k-means is the classic.
  • Density-based: clusters are dense regions separated by sparse ones (DBSCAN). Finds odd shapes and labels outliers as noise.
  • Hierarchical: repeatedly merge the two closest groups, producing a tree of clusters you can cut at any level.

Because there are no labels, evaluating a clustering is partly a judgment call: do the groups make sense to someone who knows the domain?

Everyday use cases

  • Case 01

    Shopper types

    Group supermarket customers by what and when they buy.

  • Case 02

    Organizing photos

    Group similar faces in a photo library before you name anyone.

Strengths, weaknesses and when to use it

Strengths

  • No labels needed.
  • Great for exploring a new dataset.

Weaknesses

  • The "right" number of clusters is often unclear.
  • Results depend heavily on the distance measure and feature scaling.

When to use itWhen you want to discover natural groups in unlabeled data.