← 📊 Data Science

📊 Choosing K Lab

Inertia (k):
Mean silhouette (k):
Best k by silhouette:
FPS:
Drag — rotate · Scroll — zoom

📊 Silhouette Score and the Elbow Method

A live k-means clustering lab: run clustering on a 3D point cloud, sweep the number of clusters k, and watch the elbow (inertia) curve and the silhouette-score curve build in real time.

🔬 What It Demonstrates

Inertia always decreases as k grows, so the "elbow" — not the minimum — is the signal. Silhouette score instead peaks near a genuinely good k, and can even fall as k keeps rising, giving a second, independent check.

🎮 How to Use

Pick a dataset, drag the k slider or hit Sweep to watch both bar charts respond, and switch point colouring to silhouette value to see exactly which points are poorly matched to their cluster.

💡 Did You Know?

On the "Uniform noise" dataset there is no real cluster structure at all — both curves go nearly flat, which is itself a useful diagnostic: no k is a good k.