# Function that maps non-linear distribution to normal distribution while maintaining distance

I have a collection $$X$$ of 10 million $$(x,y,z)$$ 3-tuples, where $$x$$, $$y$$, and $$z$$ are all numbers between 0 and 1. The distribution of $$x$$, $$y$$, and $$z$$ values are complex, and the distributions of $$x$$ vs. $$y$$ vs. $$z$$ are not independent.

I want to find some function $$f$$ that maps each $$(x,y,z)$$ pair to another $$n$$-tuple (I don't care about the final arity, let's assume mapping 3-tuples to 3-tuples for now) such that:

1. $$|f(x_i) - f(x_j)| + |f(y_i) - f(y_j)| + |f(z_i) - f(z_j)|$$ is a valid distance metric according to the usual rules on any pair of 3-tuples $$(x_i, y_i, z_i)$$ and $$(x_j, y_j, z_j)$$

2. When I take the distribution of the 10 million pairs $$\{f(x)\}_{x\in X}$$, it is as close as possible to Uniform(0,1) x Uniform(0,1) x Uniform(0,1).

How would I go about this? The closest thing I can think of is a variational autoencoder, but I don't know if that maintains distance properties, and results in a normal and not uniform distribution.

(I don't even know what tags this would fit under - suggestions in comments are welcome!)

• Your question doesn't typecheck. What is the type signature of $f$? In one sentence you say it maps a 3-tuple to another 3-tuple, i.e., $f:\mathbb{R}^3 \to \mathbb{R}^3$. However when you write $|f(x_i)-f(x_j)|$, that seems to imply that it maps a real number to a real number, i.e., $f:\mathbb{R} \to \mathbb{R}$. So, I am confused about what you are looking for. – D.W. Oct 6 '18 at 3:43
• As for your first requirement, if you mean $f:\mathbb{R} \to \mathbb{R}$, then every function $f$ meets the first requirement (i.e., that expression will always form a valid distance metric). – D.W. Oct 6 '18 at 3:45
• You mention pairs in multiple places. Do you mean 3-tuples? I don't see any pairs anywhere. Also, what does $f(x)$ mean for $x \in X$? Do you mean $f(x,y,z)$ for $(x,y,z) \in X$? But then is that a 3-tuple or a real number? I find it confusing to use $x$ in one place to refer to a real number and in another place to refer to a 3-tuple. Can you edit your question to correct these points? – D.W. Oct 6 '18 at 3:45
• For your second requirement, how do you propose to measure "close"? By what measure? Note that it might not be possible to get close: for example, if all of the $x$-values are 0 and all of the $y$-values are 1, you can't get close to uniform. – D.W. Oct 6 '18 at 3:48