0% found this document useful (0 votes)
67 views11 pages

Agglomerative Example

FDGFXFDX

Uploaded by

Shruti Kumari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views11 pages

Agglomerative Example

FDGFXFDX

Uploaded by

Shruti Kumari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd

Q .

Apply Agglomerative with single,complete and average linkage of following data and construc

Data A B C D E
Value 1 3 5 6 9

ANS- calculate adjacency matrix based on distance

A 0
B 2 0
C 4 2 0
D 5 3 1 0
E 8 6 4 3 0
A B C D E

for any type of linkage select minimum distance from above matrix is 1 and points are CD

Single Linkage minimum distance


in our matrix C & D are located at min. distance then we can merge them into single cluste

A 0
B 2 0
CD 0
E 8 6 0
A B CD E

To calculate the value of A from the (C,D) point

dist(A,(C,D)) MIN[dist(A,C),dist(A,D) A 0
MIN[4,5] B 2 0
4 CD 4 2
E 8 6
A B
dist(B,(C,D)) MIN[dist(B,C),dist(B,D)
MIN[2,3]
2
dist(E,(CD) MIN[dist(E,C),dist(E,D)
MIN[]
3

step in our matrix A & B are located at min. distance 2 then we can merge them into single clus

AB 0
CD 0
E 3 0
AB CD E

dist[cd,(A,B)]= MIN[dist(CD,A),dist(CD,B)]
MIN[4,2] AB 0
2 CD 2 0
E 6 3 0
dist(E,(A,B)= MIN[dist(E,A),(E,B)] AB CD E
8,6
6
select the mini. Distance 2 from point AB & CD so we merge them as ABCD

ABCD 0
E 0
ABCD E

calculate the minimum distance ABCD with respect to E

dist[(ABCD),E]= MIN[dist(AB,E),dist(cd,E)]
MIN[6,3]
3

ABCD 0
E 3 0 A B C
ABCD E

complete Linkag :Maximum distance

in our matrix C & D are located at min. distance then we can merge them into single cluster Ie CD

A 0
B 2 0
CD 0
E 8 6 0
A B CD E

To calculate the value of A from the (C,D) point

dist(A,(C,D)) MAX[dist(A,C),dist(A,D) A 0
MAX[4,5] B 2 0
5 CD 5 3
B E 8 6
A B
step in our matrix A & B are located at min. distance 2 then we can merge them into single cluster Ie AB

AB 0
CD 0
E 3 0
AB CD E

dist[cd,(A,B)]= MAX[dist(CD,A),dist(CD,B)]
MAX[5,3] AB 0
5 CD 5 0
E 8 3 0
dist(E,(A,B)= MIN[dist(E,A),(E,B)] AB CD E
8,6
8

step in our matrix CD & E are located at min. distance 3 then we can merge them into single cluster Ie CDE

AB 0
CDE 8 0
AB CDE

MAX[AB,CD),(AB,E)]
[5,8]
8

Average Linkage Consider smallest distance from distance matrix and put average points

in our matrix C & D are located at min. distance then we can merge them into single

To calculate the value of A from the (C,D) point

dist(A,(C,D))= AVG ([dist(A,C),dist(A,D)])


avg[4,5]

4.5 A 0
B 2 0
CD 4.5 0
E 8 6 0
A B CD E

similarly calculate all distance


wing data and construct the dendrogram

1 and points are CD

them into single cluster Ie CD

0
3 0
CD E

ge them into single cluster Ie AB


D E

luster Ie CD

0
4 0
CD E
cluster Ie AB
e cluster Ie CDE A B C D E

A 0
average points B 2 0
CD 0

erge them into single cluster Ie E 8 6 0

A B CD E
EX 2-for given distance matrix,draw single link,complete link and average link dendogram

1 2 3 4 5
1 0
2 2 0
3 6 3 0
4 10 9 7 0
5 9 8 5 4 0

Sol- refer sheet 1 problem for stepwise evaluation

single link 1,2,3 4,5


1,2,3 0
4,5 5 0

complete link 1,2,3 4,5


1,2,3 0
4,5 10 0

average link 1,2,3 4,5


1,2,3 0
4,5 8 0
nd average link dendogram
Home Work
X Y
A 2 2
B 3 2
C 1 1
D 3 1
E 1.5 0.5

A B C D E
A 0
B 1 0
C 1.41 1.41 2.24 0
D 1.41 1 2 0
E 1.58 2.12 0.71 1.58 0

Sol- refer sheet 1 problem for stepwise evaluation


sqrt(x2-x1)+(y2-y1) sqrt[(2-1)+(2-1)]
sqrt(1+1)
sqrt(2)

You might also like