As an instructor and researcher in Learning Analytics (LA) and Educational Data Mining (EDM), I often need to explain unsupervised learning concepts without getting bogged down in code syntax first. In a supervised setting, students already have a label to predict, such as pass versus fail or on-track versus at-risk. In an unsupervised setting, there is no answer key. Instead, the algorithm has to find groups, outliers, or patterns on its own based on geometry, density, or variance.
When teaching methods like K-Means, DBSCAN, Gaussian Mixture Models (GMM), or PCA, I noticed that static slides make it hard to show why an algorithm behaves the way it does. Students can memorize that K-Means uses centroids and DBSCAN uses density, yet still be surprised when K-Means splits a curved cluster in half or pulls a centroid toward a single outlier.
To address this, I built Unsupervised Learning Playground, a browser-based companion to my earlier ML Playground 2.0 project. You can try the live tool at https://TaridWong.github.io/unsupervised-learning-playground/ or view the source code on GitHub.
The main workspace of Unsupervised Learning Playground with the 4 modules and 2D drawing canvas.
In ML Playground 2.0, every point on the canvas belongs to a class, and the goal is to draw a decision boundary between those classes. Unsupervised algorithms ask different questions:
Clustering (10 algorithms): Which observations belong together? (K-Means, K-Medoids, DBSCAN, OPTICS, Agglomerative, Divisive DIANA, GMM, Mean Shift, Affinity Propagation, Spectral Clustering)
Outlier Detection (2 algorithms): Which observations sit outside normal behavior? (Isolation Forest, Local Outlier Factor)
Dimensionality Reduction and Embeddings (4 algorithms): How can we compress or map coordinates while keeping variance or local neighborhoods? (PCA Biplot, Neural Autoencoder, t-SNE, UMAP)
Rules and Sequential Paths (2 algorithms): Which combinations or transitions appear most often across regions? (Apriori Association Rules, Sequential Pathway Mining)
Putting all 18 algorithms on the same [-180, 180] 2D canvas lets us hold the data constant and test how different assumptions change the result.
If you want to start quickly, the Classroom Data Guide button in the top right opens six preset distributions modeled after educational data scenarios, including MOOC dropout funnels, homework system gaming, deadline crammers versus steady pacesetters, and overlapping exam competencies.
Or, if you want to test a specific edge case, you can keep the canvas blank, place points yourself with + Single Point or ++ Spray Points, and click Run Algorithm once your layout is ready. Nothing runs until you click Run Algorithm, so you can finish drawing before inspecting the output.
Drawing custom points on the canvas.
To see why algorithm choice matters, let us look at a scenario like Online Course Dropout Funnel or Collaborative Study Pods. In these datasets, points do not sit in neat circular clouds. Instead, they form narrow streams or curved arcs.
If we run K-Means with K = 2 or K = 3, K-Means draws straight Voronoi boundaries based on Euclidean distance to each centroid. Even if two points sit right next to each other along the same arc, K-Means will cut the arc in half if doing so reduces squared distance to the centers.
Now switch to DBSCAN or Spectral Clustering on the exact same points. Because DBSCAN follows local point density within radius Epsilon and MinPts, it traces the continuous stream as one cluster and marks isolated points as noise.
K-Medoid partitioning the data into straight regions (left) versus DBSCAN following density and flagging noise (right).
One detail I wanted in this tool is visibility into intermediate iterations, not just the final plot.
After running an algorithm, the playback bar below the canvas lets you step through the process from initialization to convergence (|< Start, < Prev Step, Play Steps, Next Step >, Final >|). As you step forward, the Step Narrator in the right panel updates to show what happened on that step, such as centroids shifting in K-Means, medoids swapping in PAM, or E-step responsibilities and M-step covariance ellipses updating in GMM.
Stepping through intermediate iterations with the playback controls and Step Narrator.
Without true class labels, we cannot compute accuracy or F1. Instead, we rely on internal cluster geometry and stability checks.
Below the sandbox, the Evaluation Diagnostics panel summarizes:
Mean Silhouette Score and a Per-Point Silhouette Profile, where negative bars s(i) < 0 flag boundary points that sit closer to a neighboring cluster than their own. Hovering over a bar highlights that point on the canvas.
WCSS Elbow Curve (K = 1..7) with an automatic knee indicator for choosing K.
Davies-Bouldin and Calinski-Harabasz indices.
Method-specific views such as hierarchical dendrograms, OPTICS reachability plots, PCA variance explained, Apriori rules ranked by Lift, and Markov transition tables.
If you want to compare all 10 clustering models on the same dataset at once, Compare Clustering Models in the header runs a side-by-side benchmark sorted by mean silhouette score.
Checking per-point Silhouette scores and the WCSS Elbow curve in Evaluation Diagnostics.
For teaching or assignments, the top of the right panel includes Upload Data, Save Data, Share Link, Save PNG, and Quick Tour. You can export a dataset as JSON, share a link that opens with the same preset and algorithm selected, or download a PNG of the canvas for slides and reports.
Does a 2D sandbox replace R or Python for high-dimensional educational data? No. Once datasets have dozens of features or thousands of records, you still need scripts and proper preprocessing. My goal with Unsupervised Learning Playground is simply to give students and instructors a quick place to build intuition about how these 18 algorithms behave before writing code.
If you try it in your teaching or research and have feedback, you can reach me through my portfolio or open an issue on GitHub.