213 points · by xqcgrek2 · 4y ago · 53 comments
https://twitter.com/hippopedoid/status/1318917878364672001?l...
This is both an interesting/fun visualization exercise and a cautionary story. Apparently UMAP has a tendency to render blobs as rings or loops!
Example of what could cause a swirly chain in UMAP: if A related to B and B relates to C but A does not relate to C and so on. IMO that's a valid structure to visualize as a swirly chain. If re-run multiple times, of course you will get that chain in different locations and so on. But it is interesting that it is there.
But visualisations can always deceive you into seeing something that's not there, e.g. correlation vs causation.
However, all numbers from 1 to 1 000 000 forming a distinct clusters when being mapped to 2 dimensions with UMAP… I don't know. It might be nothing (like a representation of something trivial, like an observation, that multiples of 100003 are less common than multiples of 3 in the set of first 1 000 000 integers), and all these clusters may just disappear (converge) as we go closer to infinity. But there's definitely something a bit eerie about the possibility of it not being "nothing". Normally, you wouldn't expect any patterns to form like that.
Or, well, it may be more that a "nothing" but less than "interesting" for a mathematician — maybe there actually is some pattern that becomes more visible in this visualization, but it's already well-known among number theorists. I just have no idea, that's why I'm asking. It's just weird to see any clustering at all here.
(And, yeah, BTW, there's no such thing as "correlation vs causation" in number theory.)
Why should 2 and 4 both be [1 0 ...] instead of [2 0 ...], etc?
In many cases using all 2s or all -10s would produce the exact same result in theory, but with more work by the optimizing algorithm, possibly with adverse results as described above.
It's easy to reason about mathematically, too. If the input vector is all 1s and 0s, it's easy to read off the result of multiplying that vector with another vector. Norms of binary vectors and dot products between binary vectors are super-easy, and have a nice correspondence with counting the appearances of elements.
It also corresponds to an array of Boolean values which is conceptually appealing, because that's basically how it's constructed.
With a couple of specific exceptions, there's little reason not to use all 1s.
https://gist.github.com/johnhw/dfc7b8b8519aac530ac97da226c17...
2 => [1 0 0 0...]
3 => [0 1 0 0...]
4 => [1 0 0 0...]
And map that high dimensional space back down to two dimensions (using some technique I haven't dug into yet). Colors are assigned by some scheme, later images help to illustrate how the particular clusterings happen like one where primes are rendered in white.- Richard Feynman