joinEigenanatomy.Rd
joinEigenanatomy joins the input matrix using a community membership approach.
joinEigenanatomy(
datamatrix,
mask = NULL,
listEanatImages,
graphdensity = 0.65,
joinMethod = "walktrap",
verbose = F
)
return(list(fusedlist = newelist, fusedproj = myproj, memberships = communitymembership , graph=gg, bestdensity=graphdensity ))
if (FALSE) { # \dontrun{
# if you dont have images
mat <- replicate(100, rnorm(20))
mydecom <- sparseDecom(mat)
kk <- joinEigenanatomy(mat, mask = NULL, mydecom$eigenanatomyimages, 0.1)
# or select optimal parameter from a list
kk <- joinEigenanatomy(mat, mask = NULL, mydecom$eigenanatomyimages, c(1:10) / 50)
# something similar may be done with images
mask <- as.antsImage(t(as.matrix(array(rep(1, ncol(mat)), ncol(mat)))))
mydecom <- sparseDecom(mat, inmask = mask)
eanatimages <- matrixToImages(mydecom$eigenanatomyimages, mask)
kki <- joinEigenanatomy(mat, mask = mask, eanatimages, 0.1)
if (usePkg("igraph")) {
mydecomf <- sparseDecom(mat,
inmask = mask, initializationList = kki$fusedlist,
sparseness = 0, nvecs = length(kki$fusedlist)
)
}
} # }