Saturday, March 18, 2023

Mean Clusters

Imagine you dropped some pebbles on the ground or threw several darts at a bullseye, what shape do they form on average?

If we model this 'cluster' of pebbles or darts as a Gaussian distribution then we can estimate the average shape of the cluster. 

I run it as a tournament, so each set of 2D points is averaged with one other, all the way down to one mean cluster.

In order to get the average of two clusters we have to match them up. Not only does this mean translating and rotating one cluster to be as close as possible to the other cluster, but it also means considering all permutations of the cluster order, in order to find the mapping that produces the closest Euclidean transformation between the two point sets. 

If we do this then we get shapes emerging. Obviously for 2 darts they just form a point pair. For 3 darts we get this:



For 4 darts we get this shape:


And for 5 points, we get:
For 6 we get:

Putting them in a line with 1 and 2 for completion we get:

Or rendered a bit bigger:

You might imagine a 'mean dice' using these patterns as its spots for 1 to 6, since they are the most average shape that a cluster of that size would be found in. 
 
In each case the result has to have bilateral symmetry, but if we allow reflections when comparing shapes then we get asymmetric results:
and for 4:

and for 5:

I have rotated them so the closest points are horizontal, this makes it look like the result is a spiral that grows. Does the pattern continue for 6 points?:
It looks like the pattern breaks at 6, though it is a bit hard to see because it could be this or its mirror image.


A different definition of a cluster is a set of points that are closer to each other than to any other points. Such clusters can be generated from any uniformly randomly placed set of points. It would be interesting to see whether this produces a different set of shapes. I doubt they would be very different as the distribution of such a cluster is surely fairly close to a radial Gaussian.