Silhouette (clustering)


Silhouette refers to a method of interpretation and validation of consistency within clusters of data. The technique provides a succinct graphical representation of how well each object has been classified.
The silhouette value is a measure of how similar an object is to its own cluster compared to other clusters. The silhouette ranges from −1 to +1, where a high value indicates that the object is well matched to its own cluster and poorly matched to neighboring clusters. If most objects have a high value, then the clustering configuration is appropriate. If many points have a low or negative value, then the clustering configuration may have too many or too few clusters.
The silhouette can be calculated with any distance metric, such as the Euclidean distance or the Manhattan distance.

Definition

Assume the data have been clustered via any technique, such as k-means, into clusters.
For data point , let
be the mean distance between and all other data points in the same cluster, where is the distance between data points and in the cluster . We can interpret as a measure of how well is assigned to its cluster.
We then define the mean dissimilarity of point to some cluster as the mean of the distance from to all points in .
For each data point, we now define
to be the smallest mean distance of to all points in any other cluster, of which is not a member. The cluster with this smallest mean dissimilarity is said to be the "neighboring cluster" of because it is the next best fit cluster for point.
We now define a silhouette of one data point
and
Which can be also written as:
From the above definition it is clear that
Also, note that score is 0 for clusters with size = 1. This constraint is added to prevent the number of clusters from increasing significantly.
For to be close to 1 we require. As is a measure of how dissimilar is to its own cluster, a small value means it is well matched. Furthermore, a large implies that is badly matched to its neighbouring cluster. Thus an close to one means that the data is appropriately clustered.
If is close to negative one, then by the same logic we see that would be more appropriate if it was clustered in its neighbouring cluster. An near zero means that the datum is on the border of two natural clusters.
The mean over all points of a cluster is a measure of how tightly grouped all the points in the cluster are. Thus the mean over all data of the entire dataset is a measure of how appropriately the data have been clustered. If there are too many or too few clusters, as may occur when a poor choice of is used in the clustering algorithm, some of the clusters will typically display much narrower silhouettes than the rest. Thus silhouette plots and means may be used to determine the natural number of clusters within a dataset. One can also increase the likelihood of the silhouette being maximized at the correct number of clusters by re-scaling the data using feature weights that are cluster specific.
Kaufman et al. introduced the term silhouette coefficient for the maximum value of the mean over all data of the entire dataset.
Where represents the mean over all data of the entire dataset for a specific number of clusters.