Skip to main content

Cluster analysis; K-means on height/width

Short answer

Cluster analysis discovers natural groups, summarizes data, and detects outliers. With K=2 and initial centroids (1,2), K-means converges to Cluster 1: instances 1,3,4,6, centroid (1.05, 1.625); Cluster 2: instances 2,5, centroid (2.35, 3.00).

Why do we perform cluster analysis in Data Mining? With K-means clustering algorithm, find out the clusters based on the following instances. (Choose K at least 2)

InstancesHeightWidth
10.52.2
21.53.5
30.71.5
42.01.0
53.22.5 [?]
61.01.8

Why cluster analysis?

Cluster analysis groups unlabelled data into clusters of similar objects. In data mining it is used to discover natural groupings and structure (e.g. customer segmentation), to summarise and compress large data by cluster representatives, to detect outliers, and as a preprocessing step for other tasks such as classification and indexing. It requires no class labels, so it is useful for exploring new data.

K-means on the data

Assumptions: the value for instance 5 is read as Width = 2.5; K = 2; the initial centroids are instances 1 and 2: C1 = (0.5, 2.2), C2 = (1.5, 3.5).

InstanceHeightWidth
10.52.2
21.53.5
30.71.5
42.01.0
53.22.5
61.01.8

Iteration 1

Instanced to C1 (0.5, 2.2)d to C2 (1.5, 3.5)Cluster
10.001.64C1
21.640.00C2
30.732.15C1
41.922.55C1
52.721.97C2
60.641.77C1

C1 = {1, 3, 4, 6}, C2 = {2, 5}. New centroids: C1 = ((0.5 + 0.7 + 2.0 + 1.0)/4, (2.2 + 1.5 + 1.0 + 1.8)/4) = (1.05, 1.625); C2 = ((1.5 + 3.2)/2, (3.5 + 2.5)/2) = (2.35, 3.00).

Iteration 2

Instanced to C1 (1.05, 1.625)d to C2 (2.35, 3.0)Cluster
10.802.02C1
21.930.99C2
30.372.23C1
41.142.03C1
52.320.99C2
60.181.81C1

No change, so the algorithm has converged.

Answer: Cluster 1 = {instances 1, 3, 4, 6}, centroid (1.05, 1.625); Cluster 2 = {instances 2, 5}, centroid (2.35, 3.00).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Data Mining chapter 5 questions →