Skip to content

reversing distance matrix for original values

5 messages · Eliza Botto, Sarah Goslee, Brian Ripley +1 more

#
Hi Eliza,
On Wed, Nov 14, 2012 at 9:33 AM, eliza botto <eliza_botto at hotmail.com> wrote:
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
#
On 14/11/2012 14:33, eliza botto wrote:
Partially: see ?cmdscale.  Distances contain no information on location, 
rotations or reflections.

  
    
#
You might reconstruct the values if you have some of the original data.
Metric multidimensional scaling (cmdscale) will give you a set of values
that produces your distance matrix. If it is based on a single voltage, you
only have one dimension to reconstruct. There are an infinite number of sets
of values that will produce your distance matrix, but all of them differ by
one constant value added to the vector so you must know the voltage of at
least one observation to get back to the original values. See the example
below:
[1]  1  2  3  4  5  6  7  8  9 10
[,1]          [,2]
 [1,] -4.5  1.793550e-07
 [2,] -3.5 -4.537897e-08
 [3,] -2.5 -3.241355e-08
 [4,] -1.5 -1.944813e-08
 [5,] -0.5 -6.482710e-09
 [6,]  0.5  6.482710e-09
 [7,]  1.5  1.944813e-08
 [8,]  2.5  3.241355e-08
 [9,]  3.5  4.537897e-08
[10,]  4.5  5.834439e-08
[1]  1  2  3  4  5  6  7  8  9 10

If the distance matrix is based on more than one variable, you would need to
know at least as many of the original observations as variables.

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352