-2

I would like to find a way to calculate a list of "coordinates" from a list of distances between points. I know this can't be done exactly without an angle but I am using k-means to cluster the points together and the exact coordinates do not matter, only that the integrity of the distances remain. For example, if point1 is 3.6 away from point2 and point 2 is 4.24 away from point3 and point1 is 5 away from point3. Then point1 coordinates can be (0,0), point2 (3, 2) and point3(0, 5). This would have a lot of points and all would need to be maintained. I am imagining this to be an NP problem of sorts but if I am overthinking it and there is an easy way to do this I would very much appreciate it.

Python would be nice.

Thanks.

B.K Lewis
  • 19
  • 1
  • 8

1 Answers1

0

It sounds like you are working in two dimensional space. If so you can use the Gram matrix as explained at the bottom of this page https://math.stackexchange.com/questions/156161/finding-the-coordinates-of-points-from-distance-matrix

Additionally this page (Finding the coordinates of points from distance matrix) describes how to implement it in code

Isaac Little
  • 36
  • 1
  • 7