Learn R Programming

ANTsR (version 0.3.3)

sparseDecom2boot: Convenience wrapper for 2-view eigenanatomy decomposition w/bootstrap initialization.

Description

Decomposes two matrices into paired sparse eigenevectors to maximize canonical correlation.

Usage

sparseDecom2boot(inmatrix, inmask = c(NA, NA), sparseness = c(0.01, 0.01), nvecs = 50, its = 5, cthresh = c(0, 0), statdir = NA, perms = 0, uselong = 0, z = 0, smooth = 0, robust = 0, mycoption = 1, initializationList = list(), initializationList2 = list(), ell1 = 0.05, nboot = 10, nsamp = 1, doseg = FALSE, priorWeight = 0, verbose = FALSE, estimateSparseness = 0.2)

Arguments

inmatrix
input as inmatrix=list(mat1,mat2). n by p input matrix and n by q input matrix , spatial variable lies along columns.
inmask
optional pair of antsImage masks
sparseness
a c(.,.) pair of values e.g c(0.01,0.1) enforces an unsigned 99 percent and 90 percent sparse solution for each respective view
nvecs
number of eigenvector pairs
its
number of iterations, 10 or 20 usually sufficient
cthresh
cluster threshold pair
statdir
temporary directory if you want to look at full output
perms
number of permutations
uselong
enforce solutions of both views to be the same - requires matrices to be the same size
z
subject space (low-dimensional space) sparseness value
smooth
smooth the data (only available when mask is used)
robust
rank transform input matrices
mycoption
enforce 1 - spatial orthogonality, 2 - low-dimensional orthogonality or 0 - both
initializationList
initialization for first view
initializationList2
initialization for 2nd view
ell1
gradient descent parameter, if negative then l0 otherwise use l1
nboot
n bootstrap runs
nsamp
number of samples e.g. 0.9 indicates 90 percent of data
doseg
boolean to control matrix orthogonality during bootstrap
priorWeight
Scalar value weight on prior between 0 (prior is weak) and 1 (prior is strong). Only engaged if initialization is used
verbose
activates verbose output to screen
estimateSparseness
effect size to estimate sparseness per vector

Value

outputs a decomposition of a pair of matrices

Examples

Run this code

## Not run: 
# mat<-replicate(100, rnorm(20))
# mat2<-replicate(100, rnorm(20))
# mydecom<-sparseDecom2boot( inmatrix=list(mat,mat2),
#   sparseness=c(0.1,0.3) , nvecs=3, its=3, perms=0)
# wt<-0.666
# mat3<-mat*wt+mat2*(1-wt)
# mydecom<-sparseDecom2boot( inmatrix=list(mat,mat3),
#   sparseness=c(0.2,0.2), nvecs=5, its=10, perms=200 )
# 
# ## End(Not run)

Run the code above in your browser using DataLab