0% found this document useful (0 votes)
46 views

Clustering

The Euclidean distance between observations (2,6) and (8,9) is 6.719. The Manhattan distance between observations (5.37,3.22) and (1.89,0.96) is 5.82.

Uploaded by

Bilal Ashraf
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Clustering

The Euclidean distance between observations (2,6) and (8,9) is 6.719. The Manhattan distance between observations (5.37,3.22) and (1.89,0.96) is 5.82.

Uploaded by

Bilal Ashraf
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Given two observations (13, 28) and (53, 11).

The Euclidean Distance between these two


observations will be:
43.462
07.995
51.623
25.782

Consider the following data

House
Observation Male Single Car Loan
Loan
0 1 0 1
1

1 0 0 1
2

1 0 1 0
3

1 1 0 1
4

1 1 0 0
5

The similarity between observation 2 and 3 (S23) using Matching Coefficient Method is:

0.25

0.75

0.50

Given the following data:


Observation
A B
s
1 16 15
2 3 19
3 8 12
4 9 8
5 5 4
 
Using K-means clustering and k=2. Assuming the starting points are observations 2 and 4. How
many iterations will be performed before the clustering process stops? Also what will be the
centroids of the final clusters that have been formed?
Iterations performed 2, Centroid for cluster 1 (4, 18), Centroid for Cluster 2 (9.5,
8.75)
Iterations performed 1, Centroid for cluster 1 (3, 19), Centroid for Cluster 2 (14.2,
11.65)
Iterations performed 1, Centroid for cluster 1 (4, 18), Centroid for Cluster 2 (7, 8.5)
Iterations performed 2, Centroid for cluster 1 (3, 19), Centroid for Cluster 2 (9.5,
9.75)

Consider the following set of sales transactions that were recorded in a grocery store:
 
Sales_ID Items in the Basket
S1 ITEM 1, ITEM 2, ITEM 3, ITEM 4, ITEM 5, ITEM 6
S2 ITEM 1, ITEM 2, ITEM 3, ITEM 4, ITEM5
S3 ITEM1, ITEM 3, ITEM 6
S4 ITEM 2, ITEM 5, ITEM 6
S5 ITEM 2, ITEM 3, ITEM, 4
S6 ITEM 3, ITEM 4, ITEM 5, ITEM 6
S7 ITEM 2 , ITEM 4, ITEM 6
S8 ITEM 1, ITEM 3, ITEM 5
 
The support for association rule ITEM 5 => ITEM 1 is:
0.250
0.500
0.125
0.375

Given the following data:


Observation
A B
s
1 20 18
2 8 20
3 36 26
4 22 12
5 14 4
 
Using K-means clustering and k=2. Assuming the starting points are observations 2 and 4. How
many iterations will be performed before the clustering process stops? Also what will be the
centroids of the final clusters that have been formed?
Iterations performed 2, Centroid for cluster 1 (8, 20), Centroid for Cluster 2 (23, 15)
Iterations performed 2, Centroid for cluster 1 (11, 20), Centroid for Cluster 2 (23, 16)
Iterations performed 2, Centroid for cluster 1 (36, 26), Centroid for Cluster 2 (16,
13.5)
Iterations performed 1, Centroid for cluster 1 (36, 26), Centroid for Cluster 2 (28, 7.5)

Consider the following transactions that were conducted in a retail store:


Transaction_Id Items
T1 {D,A}
T2 {A,C,D}
T3 {B,E}
T4 {C,A,D}
T5 {A,C,B}
 
The confidence of association rule D => A is:
1.00
0.25
0.75
0.67

Given the following data:


X Y
G 0.33 0.66
A 0.12 0.89
P 0.97 0.48
 
What will be values in the distance matrix (using Euclidean distance)?
G A P
G 0
A D(GA)=? 0
P D(GP)=? D(AP) = ? 0
D(GA)= 0.28 , D(GP)= 0.46 , D(AP)=
0.84
D(GA)= 0.31 , D(GP)= 0.66 , D(AP)=
0.94
D(GA)= 0.28 , D(GP)= 0.6 , D(AP)= 0.88

D(GA)= 0.31 , D(GP)= 0.56 , D(AP)=


0.63

Consider the following transactions that were conducted in a retail store:


Transaction_Id Items
T1 {D,A}
T2 {A,C,D}
T3 {B,E}
T4 {C,A,D}
T5 {A,C,B}
 
The support for association rule A => B is:
0.80
0.60
0.20
0.40

Given two observations (2, 6) and (8, 9). The Euclidean Distance between these two
observations will be:
6.719
3.542
8.263
6.708

Given two observations (5.37, 3.22) and (1.89, 0.96). The Manhattan Distance between these two
observations will be:
5.82
6.32
5.74
5.35

You might also like