# Using a distance matrix *with errors* to find the coordinates of points

(I asked this same question in stackoverflow, without getting any answer, but maybe this is a more appropriate forum.)

I would like to find the coordinates of a set of points in 3D from a distance matrix that may contain (experimental) errors.

The approach suggested here is not symmetric (treats the first point differently), and that is not adequate when there are uncertainties. These uncertainties may lead to numerical instabilities as suggested here. But the answer to this question also assumes exact data.

So I would like to see if there is any statistical approach that best uses the redundancy of the data to minimize the error in the predicted coordinates and avoids potential instabilities due to inconsistent distances.

I am aware that the final result is invariant to rigid body translations and rotations.

It would be great if you can suggest algorithms present in or based on numpy/scipy, but general suggestions are also welcome.

• @whuber: I have seen answers on CV given as actual answers; I have seen answers given as comments; but this is the first time that I see an answer given as a single tag addition! – amoeba Jun 30 '15 at 15:38
• Thanks @whuber Indeed, it's amazing how just knowing the right vocabulary allow to find the correct answer in many different sources. Thanks for your edit. Unfortunately I don't know how I can positively vote your edit or consider your edit as the right answer. – Ramon Crehuet Jul 2 '15 at 8:57

## 1 Answer

If I understand correctly, this is basically the same problem as a latent space model for social network analysis (1): one is given a matrix specifying the relations among the actors (distances in your case, adjacency matrices in the SNA case), and needs to infer their locations in some metric space. Fortunately, you know ahead of time how many dimensions the actors occupy.

There are some indeterminacies that arise, such as rotation and translation invariances, but these can be avoided by arbitrarily fixing some nodes at a specific location.

(1) Peter D. Hoff, Adrian E. Raftery, Mark S. Handcock. "Latent Space Approaches to Social Network Analysis." JASA, December 2002.

• Thanks. @whuber edit adding the multidimensional-scaling keyword was the best answer to me, because it allowed me to find lots of resources closer to my field.Maybe it was too trivial, but I'm a chemist... The paper you pointed is a specialized case that would have been hard to adapt to my problem. – Ramon Crehuet Jul 2 '15 at 9:01