I am using Silhouette cluster validation for each repetition (for a specific K) of k-means, k-modes and k-medoids.

All the definitions of Silhouette I see calculate the distance of each point to others points within the same cluster, then compare it to the distance of the same point with points in other clusters, in turn.

From wikipedia:

$ a(i) = $ average distance between point $i$ and other points in the same cluster

$ b(i) = $ average distance between point $i$ and all points in the closest cluster

$ s(i) = \frac{b(i) - a(i)}{\max\{a(i),b(i)\}} $

I would expect similar results by, instead, comparing each point with its own centroid, and then the centroids of other clusters, in turn.

Is this a good approach, or do I risk losing information? It's much more efficient computationally (with my dataset, it's a concern).

  • 1
    $\begingroup$ In an answer to a recent question I've put that the silhouette formula is general and permits various definitions of the remoteness terms a and b in it. So, a could be distance to the centroid of the home cluster and b be the distance to the closest foreign centroid. I've implemented this and some other versions for SPSS (see Clustering criterions on my web page). One should keep in mind, thought, that different versions of Silhouette criterion cannot be compared to each other numerically. $\endgroup$
    – ttnphns
    Aug 6, 2015 at 9:55
  • $\begingroup$ Thanks, that was very informative. I hadn't seen it when searching here. $\endgroup$
    – Fabio
    Aug 6, 2015 at 9:58
  • $\begingroup$ Tangentially to my question: does it make sense to use silhouette for replication performance, instead of adequacy (sum of intra-cluster distances)? With replication performance I mean this: for each K, I repeat the clustering N times (usually 10-20) and select the "best" (highest silhouette, or minimum internal distance). That's the one that is going to compete against the other K-specific silhouettes. $\endgroup$
    – Fabio
    Aug 6, 2015 at 14:08
  • $\begingroup$ I'm not in your shoes to advice confidently. If you mean to compare various results with the same number of clusters - why not do it? It is a straightforward application. $\endgroup$
    – ttnphns
    Aug 6, 2015 at 15:37
  • $\begingroup$ P.S. In some papers, that deviation-type version of Silhouette index passes as "simplified Silhouette". $\endgroup$
    – ttnphns
    Aug 26, 2018 at 9:13

1 Answer 1


If your distance function is squared Euclidean, then you can exploit additivity and Konig-Huygens.

Variance is equivalent to the average pairwise squared deviation. Similarly, the squared deviation from the center of another cluster should be the average squared deviation (but not the squared average) to the cluster members.

The same trick will not work with other distances.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.