igraph / xdata-igraph

xdata igraph, has been merged into igraph/igraph
GNU General Public License v2.0
18 stars 3 forks source link

scaling factor in adjacency.spectral.embedding seems too large. #36

Closed itmfl closed 10 years ago

itmfl commented 10 years ago

Somehow the scaling factor in the adjacency.spectral.embedding C function is too large. For example, the following code

B0 <- matrix(c(0.5,0.2, 0.2, 0.5), nrow = 2) tau <- c(400,600) g <- sbm.game(1000, B0, tau) Xhat <- adjacency.spectral.embedding(g, 2)$X Xhat[1,]

yields the output. [1] 9.584166 6.512246

I checked and it seems like this is multiplication by the singular values and not the square root of the singular values. However, I checked the C code and it seems like singular values was square rooted, so I am confused.