Evaluating Clustering
Being able to perform clustering in different ways is only useful if you know how to evaluate different clustering methods and compare them in an objective way. Subjective methods, such as visual inspection, can always be used, but the silhouette score is a powerful objective method that can be used with data that is more difficult to visualize. We’ll learn more about this in the next section.
Silhouette Score
The silhouette score is a formal measure of how well a clustering fits the data. The higher the score, the better. Typically, the score is calculated for each data point separately, and the average is taken as a measure of how well the model fits the whole dataset altogether.
There are two main components to the score. The first component measures how well the data point fits into the cluster that it is assigned to. This is defined as the average distance between it and all other members of that same cluster. The second component measures how well the data point...