Home▸Data Science▸Silhouette Score 2D: Finding the Right Number of Clusters

Silhouette Score 2D: Finding the Right Number of Clusters

Interactive 2D silhouette-score analyzer: run K-means clustering on flat scatter data, watch per-point silhouette bars grow live, and sweep K=2-8 to see which cluster count truly maximizes cluster validity.

Data Science2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-ds-topic-88 ↗ Open standalone

K-means will happily split your data into any K you ask for — this simulator shows why picking that K is a real question with a real answer. It draws a hidden mixture of Gaussian blobs on a flat scatter plot, runs Lloyd's algorithm live, and draws a colored halo around every point whose radius and color encode its silhouette coefficient: how much closer it sits to its own cluster than to its nearest rival. Sweep K from 2 to 8 and the panel plots the average silhouette for each value, exposing the peak that marks the number of clusters the data actually supports — the same diagnostic scikit-learn's silhouette_score is built on, and a sharper tool than watching inertia fall on an elbow plot. Drag to pan, scroll or pinch to zoom.

⚙ Under the hood

Run K-means on a 2D scatter plot and watch a live silhouette halo grow around every point. Sweep K from 2 to 8 to find the peak that reveals the true cluster count, drag to pan and scroll to zoom.

k-meansclusteringsilhouette-scoreunsupervised-learningdata-sciencecluster-validityscatter-plot

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)