Learn R Programming

edmcr (version 0.2.0)

grs: Guided Random Search

Description

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.

Usage

grs(D, d)

Arguments

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.

Value

P

The completed point configuration in dimension d

D

The completed Euclidean distance matrix

Details

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

References

Rahman, D., & Oldford, R.W. (2016). Euclidean Distance Matrix Completion and Point Configurations from the Minimal Spanning Tree.

Examples

Run this code
# NOT RUN {
#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)

# }

Run the code above in your browser using DataLab