A look into Hierarchical clustering

Vicky
2 min readApr 15, 2022

Hierarchical clustering proceeds iteratively, and every point makes a journey from being a single point cluster to belonging to some final cluster. Each intermediate step provides a clustering of the data (with a different number of clusters). Clustering is a unsupervised learning algorithm that is used during data analysis to find meaningful pattern in a data. It is used to divide that data into natural groups when there is no class to be predicted.

The groups so formed are such that items in a single group are closer to each other in terms of some characteristics as compared to items in other clusters. A simple example to demonstrate clustering would be to group points on a 2D plane based on their distance.

There are a number ways we may use to deal with this type of clustering, however they usually fall into one of two categories:

  1. Divisive: The top-down strategy will be used in this case.
    This will include how all of the observations we are utilising will be clustered together at first, then divided up and moved down the hierarchy till we reach the bottom.
  2. Agglomerative: This is opposite to Divisive approach. Here we will start with each observation in its own cluster, and as we progress up the hierarchy, we will be able to merge together pairs of clusters.

For the most part, you will be able to determine the splits and the
merges in a greedier manner. The results of this are usually going to
be presented with a dendrogram.
To help us determine which ones are going to be combined or split
up, we need to be able to look for and measure out the dissimilarity
between the sets of observations that we are working with. The good
news is that with most methods of this kind of clustering, we are
going to be able to make this happen with an appropriate metric,
which is a measure of distance between observations and pairs, and
a linkage criterion that is going to let us know the dissimilarity of sets
as a function of the pairwise distances of observations in the sets we
are working with.

Here is an example of Agglomerative clustering:

The is the following output:

Read other articles about machine learning at: 8bitDS

--

--