Skip to content
Part IA Lent Term

Intrinsic Evaluation: WCSS and Silhouette

What Is Intrinsic Evaluation?

Intrinsic evaluation requires no ground truth labels. It assesses cluster quality based solely on properties of the data and the clustering itself: how tight are the clusters? How well separated are they?

Silhouette score diagram showing a point evaluated relative to its own cluster and the nearest other cluster

Two main intrinsic metrics: WCSS and Silhouette.

WCSS (Within-Cluster Sum of Squares)

Formula

Elbow plot showing WCSS decreasing with increasing K, with optimal K=3 marked at the flattening point

WCSS=n=1Nxnμzn2\text{WCSS} = \sum_{n=1}^{N} \lVert x_n - \mu_{z_n} \rVert^2

where μzn\mu_{z_n} is the centroid of the cluster xnx_n is assigned to (identified by znz_n).

Interpretation

Lower WCSS means tighter, more compact clusters. A single cluster containing all points has high WCSS. Many singleton clusters (one point each) have WCSS = 0.

The Elbow Method

WCSS always decreases as KK increases (more clusters = tighter fit). The elbow method plots WCSS against KK and chooses the KK at the “elbow”: the point where the rate of decrease flattens sharply.

Procedure:

  1. Run K-Means for K=1,2,3,,KmaxK = 1, 2, 3, \ldots, K_{\text{max}}.
  2. Record WCSS for each KK.
  3. Plot WCSS vs KK.
  4. The optimal KK is the elbow: the last KK before diminishing returns set in.

Limitation: the elbow is often ambiguous for real-world data where WCSS decreases smoothly with no clear knee point.

Silhouette Score

Per-Point Formula

For a point ii assigned to cluster CC:

  • a(i)a(i) = mean distance from ii to all other points in the same cluster CC (cohesion).
  • b(i)b(i) = mean distance from ii to all points in the nearest other cluster (separation; the cluster with smallest mean distance to ii that is not CC).

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

Interpretation

  • S(i)S(i) near +1+1: point is much closer to its own cluster than to the nearest other cluster (well clustered).
  • S(i)S(i) near 00: point lies on the boundary between two clusters.
  • S(i)S(i) near 1-1: point is closer to a different cluster than its own (likely misclustered).

The overall silhouette score is the mean of S(i)S(i) across all points.

Advantages over WCSS

The silhouette score captures both cohesion and separation; WCSS only measures cohesion. Silhouette works for any distance metric, not just Euclidean. It can identify individual misclustered points.

Worked Example: Silhouette for One Point

Three clusters: C1={(1,2),(2,1),(2,2)}C_1 = \{(1,2), (2,1), (2,2)\}, C2={(8,6),(9,7),(10,6)}C_2 = \{(8,6), (9,7), (10,6)\}, C3={(5,8),(6,9)}C_3 = \{(5,8), (6,9)\}.

Compute S(i)S(i) for point p=(1,2)p = (1,2) in C1C_1.

Step 1: a(p)a(p) — cohesion within C1C_1

Distances to other points in C1C_1:

  • To (2,1)(2,1): (12)2+(21)2=21.41\sqrt{(1-2)^2 + (2-1)^2} = \sqrt{2} \approx 1.41
  • To (2,2)(2,2): (12)2+(22)2=1\sqrt{(1-2)^2 + (2-2)^2} = 1

a(p)=1.41+1.002=1.21a(p) = \frac{1.41 + 1.00}{2} = 1.21

Step 2: b(p)b(p) — separation to nearest other cluster

Mean distance to C2C_2:

  • To (8,6),(9,7),(10,6)(8,6), (9,7), (10,6): mean (19)2+=9.18\approx \sqrt{(1-9)^2 + \ldots} = 9.18

Mean distance to C3C_3:

  • To (5,8),(6,9)(5,8), (6,9): mean (15)2+=8.45\approx \sqrt{(1-5)^2 + \ldots} = 8.45

C3C_3 is nearer, so b(p)=8.45b(p) = 8.45.

Step 3: S(p)S(p)

S(p)=8.451.218.45=7.248.450.86S(p) = \frac{8.45 - 1.21}{8.45} = \frac{7.24}{8.45} \approx 0.86

The point is well clustered (close to its own cluster, far from others).

Summary

MetricFormulaMeasuresRangeBest when
WCSSxnμzn2\sum \lVert x_n - \mu_{z_n} \rVert^2Cohesion only[0,)[0, \infty)Low
Silhouette S(i)S(i)(ba)/max(a,b)(b-a)/\max(a,b)Cohesion + separation[1,1][-1, 1]Near +1
Elbow methodPlot WCSS vs KKOptimal KKClear elbow
a(i)a(i)Intra-cluster mean distanceCohesionLow
b(i)b(i)Nearest-cluster mean distanceSeparationHigh

Past paper questions: y2024p3q7e