SLIDE 28 K-Means Clustering Method - Example (1)
Given the number of desired clusters K: Randomly assign objects to create K nonempty initial partitions (clusters) Compute the centroids of the clusters of the current partitioning (the centroid is the center, i.e., mean point, of the cluster) Assign each object to the cluster with the nearest centroid (reallocation) Repeat the steps (2 and 3) until the assignment does not change Repeat the steps (2 and 3) until the assignment does not change
D1 D2 D3 D4 D5 U1 3 2 2 U2 2 1 1 U3 3 2 U4 1 2 2 1 U5 1 3 1 U6 2 1 1 2 U7 1 2 2 U8 3 1 2
Initial (arbitrary) assignment: C1={U4}, C2={U6}, C3={U7} Compute the similarity of each item to each cluster (simple matching (dot product) as the similarity measure):
U1 U2 U3 U4 U5 U6 U7 U8 C1 (U4) 8 6 8 10 3 6 5 7 C2 (U6) 6 5 4 6 5 10 6 10 C3 (U7) 4 4 5 6 6 9 3
Allocate each user to the cluster to which it has the highest similarity (shown in red in the above table) C1={U1, U2, U3, U4}, C2={U6, U8}, C3={U5, U7} C1={U1, U2, U3, U4}, C2={U6, U8}, C3={U5, U7} End of the first iteration
Artificial Intelligence Introduction to Artificial Intelligence