K-Mean Clustering
K-Mean Clustering is an unsupervised machine learning algorithm used to group unlabelled data into clusters based on similarity. The algorithm partitions n observations into k clusters, where each observation belongs to the cluster with the nearest mean (cluster centroid).
The algorithm works as follows:
- Initialisation: Randomly select k cluster centroids.
- Assignment: Assign each data point to the nearest centroid, forming k clusters.
- Update: Recalculate the centroids by computing the mean of all data points in each cluster.
- Repeat: Repeat the assignment and update steps until the centroids stabilise or the maximum number of iterations is reached.
The K-Mean Clustering component generates several outputs to help analyse and interpret clustering results:
- A 2D cluster visualisation displaying the data projected onto the first two dimensions, with points coloured according to their cluster membership.
- A Total within-clusters sum of squares curve showing the evolution of cluster compactness for the tested numbers of clusters.
- A Results table containing the coordinates of each point on the first two dimensions together with the cluster assignment for each tested configuration.
- A 3D visualisation displaying the clustered data points in three-dimensional space.
Challenges with K-Mean Clustering
K-Mean algorithm has the following limitations:
- Choosing the right number of clusters (k): Selecting an appropriate number of clusters can be difficult.
- Sensitivity to initial centroids: The final clusters can vary depending on the initial random placement of centroids.
- Assumption of spherical clusters: The algorithm assumes clusters are spherical and similarly sized. This can be a problem when the actual clusters in the data are of different shapes or densities.
- Sensitivity to outliers: Outliers can significantly influence centroid positions and affect clustering quality.
