
Data Clustering
131
0
1 2 3 4
5 6 8
7 9
10
10
1
2
p1
p3
p4
p8
p9
p5
3
4
5
6
7
8
9
X
(a)
(b)
p10
p6
p11
X
X
p12
p7
p2
0
1 2 3 4
5 6 8
7 9
10
10
1
2
p1
p4
p8
p7
p9
p5
3
4
5
6
7
8
9
p2
p3
p6
p10
p11
p12
0
1 2 3 4
5 6 8
7 9
10
10
1
2
p1
p4
p8
p7
p9
p5
3
4
5
6
7
8
9
p2
p3
p6
p10
p11
X
p12
X
X
(c)
X
X
X
Figure 7.8: k-means algorithm execution example. a) The initial centers and clusters.
b) First iteration. c) Stable centers and clusters
Time Complexity
The k-means algorithm has a time complexity of O(tknd) where n is number of ob-
jects under consideration, k is number of clusters, d is number of attributes for each
data point and t is number of iterations. Normally, k, t, d << n, we can therefore
assume that this algorithm is efficient and c