Real algorithms, running in your browser. No labels anywhere — that is the whole point.
Tap the plot to drop points. Watch the centroids hunt for the middle of their territory.
—
k-means is a loop of two moves: assign every point to its nearest centroid, then move each centroid to the middle of the points it just won. Repeat until nothing changes. It always converges — but not always to the same place. Hit New random start a few times and you will get different answers on identical data.
Same 180 points, two algorithms. One of them is simply wrong, and no label will tell you.
k-means · k=2
—
DBSCAN · density
—
—
Drag the line. PCA is not a mystery — it is the one direction that keeps the most spread.
—
the data after projection to 1D
The two arrows are the principal components: directions the data varies most, drawn at right angles. Your line captures a percentage of the total variance. When it hits the maximum, it is PC1. Drop the second axis and you lose only what PC2 explained — that is how you go from 2D to 1D without throwing away the information that matters.