K-means Flashcards

1
Q

K-Means ALG:

A

Given set of data instances D = d1,…,dn
Determine K (number of clusters)
Randomly select centroids for each cluster
while alg has not converged{
for 1 to n
for 1 to K
calculate euclidean distance ej of di from the centroid of cluster kj
end for
add di to the cluster kj with the smallest ej value
end for
for j 1 to K
for l 1 to m
calc avg al of the lth dimension of the data instances
end for
update jth centroid to the aberage values aj for each dimension of the data instance
end for
end while

How well did you know this?
1
Not at all
2
3
4
5
Perfectly