Clustering

From Machine Learning
Jump to: navigation, search

There is no criteria for a good clustering [1] . It depends on the on the user and what criteria they set. Clustering determines the intrinsic grouping within unlabelled data – it is an unsupervised learning technique.

K-means clustering[2] [3] is the simplest unsupervised clustering algorithm. It works by randomly creating k points in the dataset. K is a hyperparameter that defines the number of centroids, or points around which the datapoints will cluster. Imagining the data laid out in 2-dimensional spaces helps the visualise the implementation of this method. Through iteration these k-points (called “means”) are refined to optimise their position within a cluster of data points. The distance between data points as well as the distance between the data and the centroids is used.

This webpage has an excellent visualisation of the machine learning process of refining the clusters in a dataset (as well as visualisations for other ML methods).


Final output of an example dataset where k=3

Due to starting with a random choice for the starting points for the means, k-means can yield inconsistent results between runs. If the data does not already have clear boundaries then the algorithm can group the data incorrectly, for example in the following illustration where the larger, outlined dots are the centroids:

Examples of failure cases for k-means clustering

If k-means clustering is not appropriate, there are other types of clustering algorithms including: density-based methods, hierarchical methods, partitioning and grid-based methods.

References