Learn R Programming

edmcr (version 0.2.0)

psd2edm: Linear Matrix Operator

Description

psd2edm Transform a positive semi-definite matrix to a Euclidean Distance Matrix

Usage

psd2edm(S, V = NULL)

Arguments

S

A symmetric, positive semi-definite matrix

V

A projection matrix satisfying V'1 = 0 and VV' = I

Value

D A Euclidean Distance Matrix.

Details

The psd2edm function performs the inverse operation of the edm2psd function, taking a matrix in \(S_{n-1}^{+}\) and transforming it to a matrix in \(D_{n}^{-}\).

$$psd2edm(S_{n-1}^{+}) = D_{n}^{-}$$

Therefore, psd2edm on \(S_{n-1}^{+}\) is the inverse operator of edm2psd on \(D_{n}^{-}\).

For a symmetric positive semi-definite matrix S, psd2edm(S) will be in \(D_{n}^{-}\).

See Also

gram2edm edm2psd

Examples

Run this code
# NOT RUN {
XY <- cbind(runif(100,0,1),runif(100,0,1))
S <- edm2psd(as.matrix(dist(XY)))
D <- psd2edm(S)

# }

Run the code above in your browser using DataLab