So I recently found out about Mahalanobis distance. Given a r.v $x$ in N-dimensional space, an associated metric is defined by
$$M(x) = \sqrt{(x-\mu)^T S^{-1}(x-\mu)}$$
where $\mu$ and $S$ are mean and covariance of $x$. Further, given two random variables $x$ and $y$ which are assumed to be i.i.d, one can define the associated distance.
$$||x_1 - x_2||_M=M(x_1-x_2)$$
This operation seems cool because it decorrelates data before computing the metric. So I was thinking - is there such a thing as decorrelating the data in general? Namely, I would like to transform my data into an uncorrelated form
$$y = A(x-\mu)$$
for which the covariance is just an identity matrix
$$cov(y) = I$$
and Mahalanobis metric is the same as euclidean metric
$$M(y) = ||y||_2$$
In order to achieve this, I need to find $A$ such that
$$A^TA=S^{-1}$$
Questions:
- Have people tried this before? Under what name is this procedure known in the literature?
- I realise that $A$ is not uniquely defined. What is a good way to define $A$? Is Cholesky decomposition a good way?
Note:
- I have previously asked this question on MATH SE, but I guess I might get more background info on this method here