Model Evaluation

Silhouette Score

In shortA clustering quality metric from -1 to 1 that compares how close each point is to its own cluster versus the nearest other cluster.

Updated 24 Oct 2026· 2 min read

The silhouette score measures how well data points fit the clusters they have been assigned to. For each point, it compares the average distance to the other members of its own cluster with the average distance to the members of the nearest neighbouring cluster. Scores range from -1 to 1: higher means tight, well-separated clusters. It is one of the most common ways to evaluate clustering when there are no labels to check against.

How it works

For each data point, two values are calculated: a, the mean distance to the other points in the same cluster, and b, the mean distance to the points in the nearest other cluster. The point’s silhouette is (b – a) / max(a, b). A value near 1 means the point is far closer to its own cluster; near 0 means it sits on the border between two clusters; a negative value suggests it may be in the wrong cluster. The overall score is the average across all points.

In scikit-learn, silhouette_score(X, labels) returns this average. A common rule of thumb, used in MLforSEO’s practicals, treats scores above 0.5 as well separated; the guidance usually quoted from Kaufman and Rousseeuw (Rousseeuw introduced the measure in 1987) describes values above 0.7 as strong structure.

How it’s used in SEO and marketing

  • Choosing the number of clusters: run k-means for several values of k and compare scores, alongside the elbow method.
  • Customer segmentation: checking that segments are genuinely distinct before building campaigns for them.
  • Content and keyword clustering: comparing embedding models or algorithms on the same data.
  • Image clustering: validating colour or feature-based groupings of product images.

Example

MLforSEO’s internal linking script clusters page embeddings with k-means and picks the number of clusters automatically by silhouette score. If k=8 scores 0.41 and k=12 scores 0.29, the script chooses eight. The resulting clusters are then named with c-TF-IDF and checked by a person before they shape hubs and links.

Limitations and things to watch

  • A good score does not guarantee useful clusters. Always read samples from each cluster and ask whether the team can act on them.
  • It favours compact, round clusters and can mislead with density-based methods such as HDBSCAN, where noise points need special handling.
  • Scores on high-dimensional embeddings tend to be low and are best used for comparison, not as absolute grades.
  • It is slow on very large data sets; scikit-learn lets you compute it on a sample.
  • For topic models, use coherence score instead.

Learn it on MLforSEO

Where Silhouette Score shows up on MLforSEO

Sources and further reading

Other terms from Model Evaluation

See all 16 Model Evaluation terms →