sdp returns a completed Euclidean Distance Matrix D, with dimension d, from a partial Euclidean Distance Matrix using the methods of Alfakih et. al. (1999)

sdp(D, A, toler = 1e-08)

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.

A

a weight matrix, with \(h_{ij} = 0\) implying \(a_{ij}\) is unknown. Generally, if \(a_{ij}\) is known, \(h_{ij} = 1\), although any non-negative weight is allowed.

toler

convergence tolerance for the algorithm

Value

D

an nxn matrix of the completed Euclidean distances

optval

the minimum value achieved of the target function during minimization

Details

This is an implementation of the Semi-Definite Programming Algorithm (sdp) for Euclidean Distance Matrix Completion, as proposed in 'Solving Euclidean Distance Matrix Completion Problems via Semidefinite Programming' (Alfakih et. al., 1999).

The method seeks to minimize the following:

$$||A \cdot (D - psd2edm(S))||_{F}^{2}$$

where the function psd2edm() is that described in psd2edm(), and the norm is Frobenius. Minimization is over S, a positive semidefinite 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 be connected. If D can be decomposed into two (or more) subgraphs, then the completion of D can be decomposed into two (or more) independent completion problems.

See also

Examples

# \donttest{ D <- matrix(c(0,3,4,3,4,3, 3,0,1,NA,5,NA, 4,1,0,5,NA,5, 3,NA,5,0,1,NA, 4,5,NA,1,0,5, 3,NA,5,NA,5,0), byrow=TRUE, nrow=6) A <- matrix(c(1,1,1,1,1,1, 1,1,1,0,1,0, 1,1,1,1,0,1, 1,0,1,1,1,0, 1,1,0,1,1,1, 1,0,1,0,1,1), byrow=TRUE, nrow=6) edmc(D, method="sdp", A=A, toler=1e-2)
#> $D #> [,1] [,2] [,3] [,4] [,5] [,6] #> [1,] 0.000000 3.075874 3.967780 3.075874 3.967780 3.035247 #> [2,] 3.075874 0.000000 1.206197 4.498705 5.009161 4.585081 #> [3,] 3.967780 1.206197 0.000000 5.009161 5.577564 5.007355 #> [4,] 3.075874 4.498705 5.009161 0.000000 1.206197 4.585081 #> [5,] 3.967780 5.009161 5.577564 1.206197 0.000000 5.007355 #> [6,] 3.035247 4.585081 5.007355 4.585081 5.007355 0.000000 #> #> $optval #> [1] 0.008815824 #>
# }