Notes

Dendrogram

A dendrogram is the picture that lets you watch hierarchical clustering happen. Instead of giving you just one final grouping, it shows how individual data points gradually join into larger and larger clusters, so you can see the structure of the data at multiple levels of detail.

What it shows

In hierarchical clustering, each item starts alone and clusters are merged step by step based on a similarity rule. A dendrogram draws this process as a tree. The leaves at the bottom are individual observations, and each branch point marks a merge between two clusters. The key detail is the height of that merge: it represents the distance or dissimilarity at which the clusters were joined. Low merges mean the items were very similar; high merges mean the algorithm had to stretch further to combine them.

Why it matters

This matters because hierarchical clustering does not force you to choose the number of clusters upfront. You can “cut” the dendrogram at a chosen height and get a clustering from that level. That makes it useful when exploring customer segments, grouping similar documents by topic, or organizing genes, products, or images into nested families. If you ignore the dendrogram, you lose the main advantage of hierarchical clustering: seeing both small tight groups and broader relationships between them.

Practical use

The shape of a dendrogram depends heavily on the linkage method—such as single, complete, average, or Ward linkage—and on how distance is measured. In Python, you will see dendrograms through scipy.cluster.hierarchy.dendrogram and clustering built with functions like linkage or scikit-learn’s AgglomerativeClustering.

  • A big vertical jump suggests well-separated groups.
  • Dense low-level branching suggests many very similar items.
  • Long chains can signal the “chaining” behavior of single linkage.

Dendrogram is a tree diagram that represents the nested sequence of merges or splits produced by hierarchical clustering. Each branch shows how data points or clusters join, and the branch height encodes the distance or dissimilarity at which that event occurs. It matters because it makes cluster structure interpretable and lets practitioners choose a clustering granularity by cutting the tree at a selected height.

A dendrogram is like a family tree for data. Instead of showing parents and children, it shows which things are most alike and how groups form step by step.

Imagine sorting a big pile of photos. First, you pair the most similar ones. Then those pairs join larger groups, like “beaches,” “birthdays,” or “pets.” A dendrogram draws that process as a branching tree, so you can see both small, tight groups and bigger, broader ones.

In AI, this matters because it helps people spot natural groupings in data when no labels exist. It doesn’t just say “these belong together” — it also shows how strongly or loosely they are connected.