Two paths in a park 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 east, metres north, metres
The positions of walkers in a park were recorded, the axes are in metres. The points line up along two curving footpaths, and a few points are off the paths. You can pick out the two paths by eye at once.
k-means splits the paths wrongly 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 east, metres north, metres
k-means was run with k = 2. Each point goes to the nearest centre, so the two clusters are split by a straight border, while the paths curve into each other. 7 points fell into the other path's cluster.
Point 8 is a core point 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 east, metres north, metres
The circle is around point 8, with a radius of ε = 16 metres. It holds 3 points, counting the point itself; that is no fewer than minPts = 3. So point 8 is a core point: it sits in a crowded place.
Core points 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 east, metres north, metres
The same count was done for every point. The filled points are core points, with at least 3 points in their ε neighbourhood; there are 27 of them. The hollow points are in sparse places.
Clusters grow from core to core 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 east, metres north, metres
A core point opens a new cluster. The cluster grows by moving from core points to the core points within ε. Points that neighbour a core point but are not core points themselves join as border points; they are the 3 pale points. 2 clusters came out.
Noise 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 east, metres north, metres
The 3 points that fall in no core point's ε neighbourhood count as noise. k-means has to put every point into a cluster; DBSCAN can leave the points off the paths apart.
Two paths, two clusters 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 east, metres north, metres
DBSCAN found the two paths as two separate clusters; the 7 points k-means split wrongly are on their own path too. We did not give the number of clusters; it came out of ε and minPts. The price: ε and minPts must suit the data. Try making ε smaller and bigger.