[R] reversing distance matrix for original values

Sarah Goslee sarah.goslee at gmail.com
Wed Nov 14 15:44:58 CET 2012


Hi Eliza,

On Wed, Nov 14, 2012 at 9:33 AM, eliza botto <eliza_botto at hotmail.com> wrote:
>
> dear useRs,
> i created a distance matrix, of certain voltage values. unfortunately, i lost the original values. i am only left with the distance matrix that i created from those values. i wanted to ask that is there a way in R to reverse distance matrix for the original values?

There is not, and a bit of thought will tell you why.

Say you used Euclidean distance as your metric, and only had one variable.

For a distance of 2, the original data could be:
dist(c(10, 12))
dist(c(5, 7))
dist(c(7, 5))
dist(c(1, 3))
dist(c(100000, 100002))
dist(c(2, 4))
dist(c(2.1, 4.1))
dist(c(2.2, 4.2))

and so on. Even with known bounds on your voltage values, there are an
infinite number of equivalent solutions. I suppose you could try to
treat it as a system of X equations and X unknowns and find possible
solutions, but that doesn't get you back your original data.

Sarah
--
Sarah Goslee
http://www.functionaldiversity.org




More information about the R-help mailing list