Hierarchical
Clustering in
Machine Learning
Hierarchical clustering is another unsupervised
machine learning algorithm, which is used to group
the unlabeled datasets into a cluster and also known
as hierarchical cluster analysis or HCA.
In this algorithm, we develop the hierarchy of clusters
in the form of a tree, and this tree-shaped structure is
known as the dendrogram.
The 1.Agglomerative: Agglomerative is a bottom-
hierarchical up approach, in which the algorithm starts with
taking all data points as single clusters and merging
clustering them until one cluster is left.
technique 2.Divisive: Divisive algorithm is the reverse of the
agglomerative algorithm as it is a top-down
has two approach.
approaches:
Why
a predetermined number of clusters.
hierarchical
clustering? it always tries to create the clusters of the same size.
Step-1: Create each data point as a single cluster.
Let's say there are N data points, so the number of
clusters will also be N.
Agglomerati
ve
Hierarchical
clustering
Step-2: Take two closest data points or clusters and
merge them to form one cluster. So, there will now be
N-1 clusters.
Step-3: Again, take the two closest clusters and
merge them together to form one cluster. There will
be N-2 clusters.
Step-4: Repeat Step 3 until only one cluster left. So,
we will get the following clusters. Consider the below
images:
Step-5: Once all the clusters are combined into one
big cluster, develop the dendrogram to divide the
clusters as per the problem.
Dendrogra
m