Complete Link Agglomerative
Clustering
Question. For the given set of points, identify clusters
using the complete link agglomerative clustering
Sample No X Y
P1 1 1
P2 1.5 1.5
P3 5 5
P4 3 4
P5 4 4
P6 3 3.5
Distance Matrix for some points
is
Merging the two closest members of the two clusters and
finding the minimum element in distance matrix. So,
the minimum value is 0.5 and hence we combine P4
and P6. To update the distance matrix,
max (d(P4,P6), P1) = max (d(P4,P1), d(P6,P1)) = max (3.6, 3.2) = 3.6
max (d(P4,P6), P2) = max (d(P4,P2), d(P6,P2)) = max (2.92, 2.5) = 2.92
max (d(P4,P6), P3) = max (d(P4,P3), d(P6,P3)) = max (2.24, 2.5) = 2.5
max (d(P4,P6), P5) = max (d(P4,P5), d(P6,P5)) = max (1.0, 1.12) = 1.12
• Again, merging the two closest members of the two clusters and finding the
minimum element in distance matrix. We get the minimum value as 0.71 and
hence we combine P1 and P2. To update the distance matrix,
• max (d(P1, P2), P3) = max (d(P1, P3), d(P2, P3)) = max (5.66, 4.95) = 5.66
• max (d(P1,P2), (P4,P6)) = max (d(P1, P4, P6), d(P2, P4, P6)) = max (3.6, 2.92) = 3.6
• max (d(P1,P2), P5) = max (d(P1, P5), d(P2, P5)) = max (4.24, 3.53) = 4.24
• Again, merging the two closest members of the two clusters and finding the
minimum element in distance matrix. We get the minimum value as 1.12 and
hence we combine P4, P6 and P5. To update the distance matrix,
• max (d(P4,P6,P5), (P1,P2)) = max (d(P4,P6,P1,P2), d(P5,P1,P2)) = max (3.6,
4.24) = 4.24
• max (d(P4,P6,P5), P3) = max (d(P4,P6,P3), d(P5, P3)) = max (2.5, 1.41) = 2.5
• Again, merging the two closest members of the two clusters and finding the
minimum element in distance matrix. We get the minimum value as 2.5 and
hence combine P4,P6,P5 and P3. to update the distance matrix,
• min (d(P4,P6,P5,P3), (P1,P2)) = max (d(P4,P6,P5,P1,P2), d(P3,P1,P2)) = mac
(3.6, 5.66) = 5.66
So now we have reached to the solution finally, the dendrogram for those
question will be as follows:
Agglomerative
Algorithm: Average Link
• Question. For the points given in the previous question, identify
clusters using average link agglomerative clustering
• Merging two closest members of the two clusters and finding the minimum
elements in distance matrix. We get the minimum value as 0.5 and hence we
combine P4 and P6. To update the distance matrix :
• average (d(P4,P6), P1) = average (d(P4,P1), d(P6,P1)) = average (3.6, 3.20) = 3.4
• average (d(P4,P6), P2) = average (d(P4,P2), d(P6,P2)) = average (2.92, 2.5) = 2.71
• average (d(P4,P6), P3) = average (d(P4,P3), d(P6,P3)) = average (2.24, 2.5) = 2.37
• average (d(P4,P6), P5) = average (d(P4,P5), d(P6,P5)) = average (1.0, 1.12) = 1.06
• Merging two closest members of the two clusters and finding the minimum
elements in distance matrix. We get the minimum value as 0.71 and hence we
combine P1 and P2. To update the distance matrix:
• average (d(P1,P2), P3) = average (d(P1,P3), d(P2,P3)) = average (5.66, 4.95) = 5.31
• average (d(P1,P2), (P4,P6)) = average (d(P1,P4,P6), d(P2,P4,P6)) = average (3.2,
2.71) = 2.96
• average (d(P1,P2), P5) = average (d(P1,P5), d(P2,P5)) = average (4.24, 3.53) = 3.89
• Merging two closest members of the two clusters and finding the minimum
elements in distance matrix. We get the minimum value as 1.12 and hence we
combine P4,P6 and P5. To update the distance matrix:
• average (d(P4,P6,P5), (P1,P2)) = average (d(P4,P6,P1,P2), d(P5,P1,P2)) = average
(2.96, 3.89) = 3.43
• average (d(P4,P6,P5), P3) = average (d(P4,P6,P3), d(P5,P3)) = average (2.5, 1.41)
= 1.96
• Merging two closest members of the two clusters and finding the minimum
elements in distance matrix. We get the minimum value as 1.96 and hence we
combine P4,P6,P5 and P3. To update the distance matrix:
• average (d(P4,P6,P5,P3), (P1,P2)) = average (d(P4,P6,P5,P1,P2), d(P3,P1P2)) =
average (3.43, 5.66) = 4.55