Initially, each data point is considered as an individual cluster in this technique. After each iteration, the similar clusters merge with other clusters and the merging will stop until one cluster or K clusters are formed.
The steps of the agglomerative algorithm are as follows:
- Compute the proximity matrix.
- Let each data point be a cluster.
- Repeat this step: Combine the two closest clusters and accordingly update the proximity matrix.
- Until only a single cluster remains.
For Example,
Let’s say we have six observations named {A,B,C,D,E,F}.
Step- 1: In the first step, we compute the proximity of individual observations and consider all the six observations as individual clusters.
Step- 2: In this step, similar clusters are merged together and result in a single cluster.
For our example, we consider B, C, and D, E are similar clusters that are merged in this step. Now, we are remaining with four clusters named A, BC, DE, F.
Step- 3: We again compute the proximity of new clusters and merge the similar clusters to form new clusters A, BC, DEF.
Step- 4: Again, compute the proximity of the newly formed clusters. Now, the clusters named DEF and BC are similar and combine together to form a new cluster. Therefore, now we are left with two clusters named A, BCDEF.
Step- 5: Finally, all the clusters are combined together and form a single cluster and our procedure is completed for the given algorithm.
Therefore, the pictorial representation of the above example is shown below: