Hierarchical Clustering in Data Mining (original) (raw)

Last Updated : 12 Jul, 2025

A **Hierarchical clustering method works via grouping data into a tree of clusters. Hierarchical clustering begins by treating every data point as a separate cluster. Then, it repeatedly executes the subsequent steps:

  1. Identify the 2 clusters which can be closest together, and
  2. Merge the 2 maximum comparable clusters. We need to continue these steps until all the clusters are merged together.

In Hierarchical Clustering, the aim is to produce a hierarchical series of nested clusters. A diagram called **Dendrogram(A Dendrogram is a tree-like diagram that statistics the sequences of merges or splits) graphically represents this hierarchy and is an inverted tree that describes the order in which factors are merged (bottom-up view) or clusters are broken up (top-down view).

What is Hierarchical Clustering?

Hierarchical clustering is a method of cluster analysis in data mining that creates a hierarchical representation of the clusters in a dataset. The method starts by treating each data point as a separate cluster and then iteratively combines the closest clusters until a stopping criterion is reached. The result of hierarchical clustering is a tree-like structure, called a dendrogram, which illustrates the hierarchical relationships among the clusters.

**Hierarchical clustering has several advantages over other clustering methods

**Drawbacks of Hierarchical Clustering

Types of Hierarchical Clustering

Basically, there are two types of hierarchical Clustering:

  1. Agglomerative Clustering
  2. Divisive clustering

1. Agglomerative Clustering

Initially consider every data point as an **individual Cluster and at every step, merge the nearest pairs of the cluster. (It is a bottom-up method). At first, every dataset is considered an individual entity or cluster. At every iteration, the clusters merge with different clusters until one cluster is formed.

The algorithm for Agglomerative Hierarchical Clustering is:

Let's see the graphical representation of this algorithm using a dendrogram.

**Note: This is just a demonstration of how the actual algorithm works no calculation has been performed below all the proximity among the clusters is assumed.

Let's say we have six data points **A, B, C, D, E, and F.

Agglomerative Hierarchical clustering

Agglomerative Hierarchical clustering

2. Divisive Hierarchical clustering

We can say that Divisive Hierarchical clustering is precisely the **opposite of Agglomerative Hierarchical clustering. In Divisive Hierarchical clustering, we take into account all of the data points as a single cluster and in every iteration, we separate the data points from the clusters which aren't comparable. In the end, we are left with N clusters.

Divisive Hierarchical clustering

Divisive Hierarchical clustering

Also Check: