Sunday, January 21, 2024

Mean Transformations

A while back I looked at mean polyhedrons and said that the mean cuboid should have sides of length (2,5,11) or (1,2.5,5.5).

A different way to estimate a shape's principle dimensions is to represent it by a random transformation of a sphere by a transformation matrix M. The eigenvalues of that transformation then give the principle dimensions of the resulting ellipsoid. This can be done in any number of dimensions and just requires a decision on what a random nxn matrix should look like. 

If seems to me that what I should really do is treat it as a n^2 length vector with equal likelihood of pointing in any direction. This is easily achieved by sampling each vector element from a N(0,1) normal distribution, then normalising the vector.

I then order the eigenvalues by their absolute value and average them over 300,000 randomly sampled vectors representing the matrix M. The resulting shape dimensions for each number of dimensions is:

1: 1

2: 1, 2.34, 

3: 1, 2.70, 4.41 

4: 1, 2.393, 4.23, 6.04

5: 1, 2.532, 4.096, 6.130, 8.16

6: 1, 2.412, 4.06, 5.67, 7.77, 9.90,

7: 1, 2.486, 4.02, 5.774, 7.475, 9.705, 12.0

8: 1, 2.417, 4.00, 5.557, 7.35, 9.084, 11.371, 13.731

9: 1, 2.464, 3.99, 5.65, 7.27, 9.14, 10.95, 13.33, 15.82

10:1, 2.420, 3.98, 5.524, 7.214, 8.856, 10.756, 12.61, 15.04, 17.61


A few interesting things to note:

1. The pattern is not simple, the second extent for example oscillates, perhaps converging towards 2.44 somewhere.

2. The third extent however just decreases, converging towards 3.95 perhaps

3. The fourth extent also oscillates, the fifth decreases and the sixth oscillates... do only the even extents oscillate?

4. They all seem to converge, suggesting that there is a value for the infinite dimensional shape. 

5. The shape is quite different to the previous mean ellipsoid for the 3D case. That one was more cylindrical, this one is more planar.

6. For each dimension the sequence grows superlinearly. Is there a pattern?


If we look at the difference between consecutive extents in the 10D case:

1.42096, 1.55935, 1.54375, 1.68965, 1.64261, 1.89974, 1.85389, 2.43466, 2.56585

You'll notice that this is also not smooth, it oscillates, though this time while growing. The same is true for all cases < 10D too. So none of the extents seem to follow a simple pattern.

Update: this topic seems to be exactly the subject of Random Matrix Theory, and the above eigenvalues should tend to a semicircle distribution if I'm understanding it right. The oscillations appear in the link for finite values of n (probably causing the oscillation with respect to n too):


 The simple takeaway is that as n tends to infinity, the distribution of Eigenvalues will tend to a quarter circle (or a semicircle if we allow negative eigenvalues). This semicircle histogram is because the eigenvalues (in the complex matrix case) tend to a uniform unit disk distribution.

No comments:

Post a Comment