K-Means Clustering
K-means is one of the simplest and most widely used clustering algorithms. It is a type of
partitioning clustering method that partitions the dataset into random segments. K-means is a
faster and more robust algorithm that generates spherical clusters. It requires the number of
clusters as input at the beginning.
K-means algorithms take input data and a predefined number of clusters as input. K-means
algorithm works in the following steps:
1. It selects k random records as the center of clusters for the first iteration.
2. It allocates the records to the nearest center value cluster.
3. It computes the new cluster center by finding the mean of all the records.
Repeat steps 2 and 3 until there is no change in the cluster value.
The k-means method does not guarantee convergence to the global solution. It results may depend upon the initial cluster center. The k-means method is not suitable for finding non-convex clusters and nominal attributes. The predefined number of clusters can be seen as a disadvantage.