Log inStart free
LESSON 4.33 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Cluster validation and the silhouette score

Watch each point score its own cluster, and see which k fits best.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 2 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 4.33 · CLUSTER BAYK-MEANS, K = 3 · SIZES 10, 18, 12
01
Stage 1 of 6 · Clusters to judge
k-means puts the 40 points in 3 clusters. Cluster validation asks if they are real.
Explain it simply

Each cobalt mark is a point, and its shape shows its cluster. Clusters are named A, B, C and so on, by their leftmost point. The ochre crosses are the centroids, the middle of each cluster. With real data there is no answer key, so the next stages use the distances alone.

Forty points on a plane, in 3 clusters. Cluster A has 10 points. Cluster B has 18 points. Cluster C has 12 points. k-means made them, with k = 3. The labels strip lists the cluster of each point.

a, the distances inside a clusterb, centroids and the chosen kpoints (shape = cluster), silhouette s and its means below 0, noise and inertiacluster outline
points · k-means, k = 3024681002468x₁x₂27labels12345678910111213141516171819202122232425262728293031323334353637383940A · 10 pointscentroid (2.5, 2.5)B · 18 pointscentroid (2.7, 5.1)C · 12 pointscentroid (7.7, 4.3)points · k-means, k = 3024681002468x₁x₂27labels12345678910111213141516171819202122232425262728293031323334353637383940A · 10 pointscentroid (2.5, 2.5)B · 18 pointscentroid (2.7, 5.1)C · 12 pointscentroid (7.7, 4.3)
Toy: the 4.C3 points · 40 points · k-means: best of 1000 k-means++ starts
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
c(i)=arg⁡min⁡c ∥xi−μc∥\sy{l}{out}{c(i)} = \arg\min_{c}\ \lVert \sy{x}{data}{x_i} - \sy{mu}{param}{\mu_c} \rVert
∥x27−μc∥=2.34, 1.77, 3.50⇒c(27)=B\lVert x_{27} - \mu_c \rVert = 2.34,\ 1.77,\ 3.50 \Rightarrow c(27) = \text{B}

In k-means, each point joins the cluster with the nearest centroid.

Common mix-ups

MYTHThe highest silhouette always finds the true groups.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01Which k gives the highest mean silhouette?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 2 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.