Distance between columns vs distance between rows and SVD
0
0
Entering edit mode
Lenny186 • 0
@d0519f0c
Last seen 22 months ago
France

Hi,

Here's verified code : Let z = s$d * t(s$v). We showed a derivation demonstrating that because is orthogonal, the distance between e[,3] and e[,45] is the same as the distance between y[,3] and y[,45], which is the same as z[,3] and z[,45]:

library(tissuesGeneExpression)
data(tissuesGeneExpression)
y = e - rowMeans(e)
s = svd(e)
z = s$d * t(s$v)
a=sqrt(crossprod(e[,3]-e[,45]))
b=sqrt(crossprod(y[,3]-y[,45]))
c=sqrt(crossprod(z[,3]-z[,45]))

Is that transposable to row distances ? for example :

y1 =e - colMeans(e)
z1 = (s*u)  * (s$d)
a1=sqrt(crossprod(e[3,]-e[45,]))
b1=sqrt(crossprod(y1[3,]-y1[45,]))
c1=sqrt(crossprod(z1[3,]-z1[45,]))

a1 and b1 equals but not c1. What calculation should be done on z1 to be equals with a1 and b1 ?

Thanks a lot Lenny

```

distance svd • 514 views
ADD COMMENT

Login before adding your answer.

Traffic: 739 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6