grs
performs Euclidean Distance Matrix Completion using the guided random search algorithm
of Rahman & Oldford. Using this method will preserve the minimum spanning tree in the partial distance
matrix.
grs(D, d)
D | An nxn partial-distance matrix to be completed. D must satisfy a list of conditions (see details), with unkown entries set to NA |
---|---|
d | The dimension for the resulting completion. |
The completed point configuration in dimension d
The completed Euclidean distance matrix
The matrix D is a partial-distance matrix, meaning some of its entries are unknown. It must satisfy the following conditions in order to be completed:
diag(D) = 0
If \(a_{ij}\) is known, \(a_{ji} = a_{ij}\)
If \(a_{ij}\) is unknown, so is \(a_{ji}\)
The graph of D must contain ONLY the minimum spanning tree distances
Rahman, D., & Oldford, R.W. (2016). Euclidean Distance Matrix Completion and Point Configurations from the Minimal Spanning Tree.
#D matrix containing only the minimum spanning tree D <- matrix(c(0,3,NA,3,NA,NA, 3,0,1,NA,NA,NA, NA,1,0,NA,NA,NA, 3,NA,NA,0,1,NA, NA,NA,NA,1,0,1, NA,NA,NA,NA,1,0),byrow=TRUE, nrow=6) edmc(D, method="grs", d=3)#> $P #> [,1] [,2] [,3] #> [1,] 1.631842 -0.9296982 -2.33939160 #> [2,] 0.000000 0.0000000 0.00000000 #> [3,] -0.661607 -0.1648741 0.73150032 #> [4,] 2.692361 -2.2771540 0.12224642 #> [5,] 2.548337 -3.1742695 0.53990741 #> [6,] 3.445614 -3.2000405 0.09919348 #> #> $D #> 1 2 3 4 5 6 #> 1 0.000000 3.000000 3.908355 3.000000 3.764097 3.793537 #> 2 3.000000 0.000000 1.000000 3.528340 4.106277 4.703441 #> 3 3.908355 1.000000 0.000000 4.010239 4.404192 5.146000 #> 4 3.000000 3.528340 4.010239 0.000000 1.000000 1.191487 #> 5 3.764097 4.106277 4.404192 1.000000 0.000000 1.000000 #> 6 3.793537 4.703441 5.146000 1.191487 1.000000 0.000000 #>