Home▸Computer Science▸3D K-Means Clustering Lab — Data Science Simulator

📊 3D K-Means Clustering Lab — Data Science Simulator

Real Lloyd's-algorithm k-means clustering rendered in genuine 3D: watch synthetic Gaussian data blobs converge into clusters as centroids and confidence ellipsoids update live in WebGL.

Computer Science3DModerate60 FPS📱 Mobile-adapted⇄ 2D version
3d-interactive-data-science-simulator-analytics ↗ Open standalone

This 3D companion runs the same data-science mechanic as the 2D original — data volume, data quality (noise) and processing-speed controls over a synthetic dataset — but instead of scattering decorative random dots, it drives a genuine unsupervised-learning algorithm: Lloyd's k-means clustering, executed step by step on synthetic 3D Gaussian blobs and rendered as real lit spheres in a WebGL scene. Each slider changes an actual input to the computation: data volume sets the point count, data quality sets the Gaussian noise standard deviation the points are jittered by, k sets how many clusters the algorithm tries to find, processing speed sets how many Lloyd iterations run per second, and the confidence-ellipsoid slider sets the sigma multiplier (68% / 95% / 99.7%) used to size the translucent wireframe sphere drawn around each centroid from that cluster's own measured standard deviation. The live readout panel reports the iteration count, the sum-of-squared-errors inertia (which decreases monotonically as Lloyd's algorithm converges), a clustering-accuracy percentage scored against the known generating blobs, and the average point-to-centroid cohesion distance — all recomputed from the actual point assignments every step, not decorative numbers.

⚙ Under the hood

Real Lloyd's-algorithm k-means (assign → update-centroid → measure-inertia) running on synthetic 3D Gaussian blobs, rendered with instanced lit spheres, per-cluster confidence ellipsoids sized from measured standard deviation, and a live SSE/accuracy/cohesion readout.

k-meansclusteringmachine learningunsupervised learning3Dwebgl

3D · Three.js r128 · WebGL · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)