eanatDef.Rd
Simplified, low-parameter eigenanatomy implemented with deflation. The
algorithm is able to automatically select hidden sparseness
parameters, given the key parameter nvecs
. The user should select the
cthresh
and smoother
regularization parameters for a given
application and also based on observing algorithm behavior when
verbose=TRUE
.
eanatDef(
inmat,
nvecs = 0,
mask = NULL,
smoother = 0,
cthresh = 0,
its = 5,
eps = 0.1,
positivity = FALSE,
priors = NA,
priorWeight = 0,
sparEpsilon = 1e-04,
whiten = FALSE,
verbose = FALSE
)
input matrix
number of eigenanatomy vectors to compute. see
eanatSelect
for a method to compute an optimal nvecs
value.
input mask, must match matrix
regularization parameter, typically 0 or 0.5, in voxels
remove isolated voxel islands of size below this value
number of iterations
gradient descent parameter
return unsigned eigenanatomy vectors
external initialization matrix.
weight on priors in range 0 to 1.
threshold that controls initial sparseness estimate
use ICA style whitening.
controls whether computation is silent or not.
matrix is output, analogous to svd(mat,nu=0,nv=nvecs)
Kandel, B. M.; Wang, D. J. J.; Gee, J. C. & Avants, B. B. Eigenanatomy: sparse dimensionality reduction for multi-modal medical image analysis. Methods, 2015, 73, 43-53. PS Dhillon, DA Wolk, SR Das, LH Ungar, JC Gee, BB Avants Subject-specific functional parcellation via Prior Based Eigenanatomy NeuroImage, 2014, 99, 14-27.
if (FALSE) { # \dontrun{
mat <- matrix(rnorm(2000), ncol = 50)
nv <- eanatSelect(mat, selectorScale = 1.2)
esol <- eanatDef(mat, nvecs = nv)
es2 <- sparseDecom(mat, nvecs = nv)
print(paste("selected", nrow(esol), "pseudo-eigenvectors"))
print(mean(abs(cor(mat %*% t(esol))))) # what we use to select nvecs
networkPriors <- getANTsRData("fmrinetworks")
ilist <- networkPriors$images
mni <- antsImageRead(getANTsRData("mni"))
mnireg <- antsRegistration(meanbold * mask, mni, typeofTransform = "Affine")
for (i in 1:length(ilist)) {
ilist[[i]] <- antsApplyTransforms(meanbold, ilist[[i]], mnireg$fwdtransform)
}
pr <- imageListToMatrix(ilist, cortMask)
esol <- eanatDef(boldMat,
nvecs = length(ilist), cortMask, verbose = FALSE,
cthresh = 25, smoother = 0, positivity = TRUE, its = 10, priors = pr,
priorWeight = 0.15, eps = 0.1
)
} # }