Saturday 24 February 2024

Visualizing von Neumann's elephant

Figure 1: This is not an elephant

John von Neumann once remarked to fellow physicist Enrico Fermi: [1]

"With four parameters I can fit an elephant, and with five I can make him wiggle his trunk."

Von Neumann was pointing out the danger of relying on too many input parameters to model a data set - which may then fail to fit additional data or predict future observations.

Figure 2: 128 sample points
Consider the elephant image in Figure 1. How might we model it in order to draw it programmatically?

One approach would be to find a number of points on the green line, as per Figure 2, and then join the points with straight lines.

Figure 3: Satellite path in green
However the approach I'm going to take is to draw the elephant using circles or, more specifically, epicycles.

An epicycle is a circle that moves on the perimeter of another circle and is famously associated with Ptolemaic astronomy. Per Figure 3, imagine the Earth's orbit around the Sun as a large circle and the moon's orbit as a smaller circle on that large circle. Then consider, in turn, a satellite orbiting the moon and you have the idea of epicycles and the complicated absolute path that the satellite can take through space.[2]

The key insight is that the elephant drawing in Figure 1 is, in a sense, just like the complicated satellite path. It also can be represented as a series of circles moving on circles over time. The magic of transforming the set of sample points in Figure 2 into a set of spinning circles is achieved via a Fourier Transform. Figure 4 below shows the (partial) result of applying that transformation.

Figure 4: Drawing an elephant from 128 epicycles (zoomed-in detail on right)

The larger circles (with their radial arrow identifying the present position of their orbiting satellite) contribute the broad strokes of the drawing, so-to-speak, while the smaller circles provide the finer detail.

So can we use less than 128 epicycles? Certainly. The next step is to remove the circles that have minimal effect on the shape of the elephant. These will generally be the smaller circles. Here are the results.[3]

Figure 5: (top row) 50 epicycles, 20 epicycles, (bottom row) 16 epicycles, 8 epicycles

With fifty epicycles, the drawing is virtually indistinguishable from the original image, whereas eight epicycles is about as far as one can reduce to while still retaining recognizable elephant features.[4]

The next step is to figure out how to specify those eight epicycles with just four parameters. That will be explored in my next post.

References:

--

[1] A meeting with Enrico Fermi (subtitled "How one intuitive physicist rescued a team from fruitless research.") - Freeman Dyson, Nature, 2004

'“There are two ways of doing calculations in theoretical physics”, [Fermi] said. “One way, and this is the way I prefer, is to have a clear physical picture of the process that you are calculating. The other way is to have a precise and self-consistent mathematical formalism. You have neither. ... To reach your calculated results, you had to introduce arbitrary cut-off procedures that are not based either on solid physics or on solid mathematics."
...
In desperation I asked Fermi whether he was not impressed by the agreement between our calculated numbers and his measured numbers. He replied, “How many arbitrary parameters did you use for your calculations?” I thought for a moment about our cut-off procedures and said, “Four.” He said, “I remember my friend Johnny von Neumann used to say, with four parameters I can fit an elephant, and with five I can make him wiggle his trunk.” With that, the conversation was over.'

[2] The term planet means "wanderer" in Greek, expressing the fact that they are seen to move across the sky relative to the background stars.

[3] The "8 epicycles" result comes from the Mayer paper and involves some adjustments to the remaining epicycles.

[4] Drawing with just one circle would produce a circular elephant.

No comments:

Post a Comment