Problem 1: Compute the centroid of the following clusters:
a) 2, 3, 4
b) USD 100, USD 400, USD 1,000
c) (10,20), (40, 60), (0, 40)
d) (USD 200, 40 km), (USD 300, 60 km), (USD 500, 100 km), (USD 250, 200 km)
e) (1,2,4), (0,0,3), (10,20,5), (4,8,2), (5,0,1)
Problem 2: Cluster the following datasets into two, three, and four clusters using the k-means clustering algorithm:
a) 0, 2, 5, 4, 8, 10, 12, 11
b) (2,2), (2,5), (10,4), (3,5), (7,3), (5,9), (2,8), (4,10), (7,4), (4,4), (5,8), (9,3)
Problem 3: We are given the ages of the couples and the number of children they have:
Couple number | Wife's age | Husband's age | Number of children |
1 | 48 | 49 | 5 |
2 | 40 | 43 | 2 |
3 | 24 | 28 | 1 |
4 | 49 | 42 | 3 |
5 | 32 | 34 | 0 |
6 | 24 | 27 | 0 |
7 | 29 | 32 | 2 |
8 | 35 | 35 | 2 |
9 | 33 | 36 | 1 |
10 | 42 | 47 | 3 |
11 | 22 | 27 | 2 |
12 | 41 | 45 | 4 |
13 | 39 | 43 | 4 |
14 | 36 | 38 | 2 |
15 | 30 | 32 | 1 |
16 | 36 | 38 | 0 |
17 | 36 | 39 | 3 |
18 | 37 | 38 | ? |
We would like to guess, using clustering, how many children a couple has where the age of the husband is 37 and the age of the wife is 38.