eanatDef: Eigenanatomy with deflation

View source: R/eanatDef.R

eanatDefR Documentation

Eigenanatomy with deflation

Description

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.

Usage

eanatDef(
  inmat,
  nvecs = 0,
  mask = NULL,
  smoother = 0,
  cthresh = 0,
  its = 5,
  eps = 0.1,
  positivity = FALSE,
  priors = NA,
  priorWeight = 0,
  sparEpsilon = 0.0001,
  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)

Author(s)

Avants BB, Tustison NJ

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.

See Also

eanatSelect https://github.com/stnava/blindSourceSeparationInANTsR

Examples

## Not run: 
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
)

## End(Not run)


stnava/ANTsR documentation built on April 16, 2024, 12:17 a.m.