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
)

Arguments

inmat

input matrix

nvecs

number of eigenanatomy vectors to compute. see eanatSelect for a method to compute an optimal nvecs value.

mask

input mask, must match matrix

smoother

regularization parameter, typically 0 or 0.5, in voxels

cthresh

remove isolated voxel islands of size below this value

its

number of iterations

eps

gradient descent parameter

positivity

return unsigned eigenanatomy vectors

priors

external initialization matrix.

priorWeight

weight on priors in range 0 to 1.

sparEpsilon

threshold that controls initial sparseness estimate

whiten

use ICA style whitening.

verbose

controls whether computation is silent or not.

Value

matrix is output, analogous to svd(mat,nu=0,nv=nvecs)

References

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.

Author

Avants BB, Tustison NJ

Examples

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
)
} # }