Learn R Programming

rtemis (version 0.79)

x.SD2RES: Sparse CCA with Initialization By Resampling

Description

Run sparse CCA on a pair of matrices using ANTsR

Usage

x.SD2RES(x, z, x.test = NULL, z.test = NULL, k = 4, inmask = c(NA,
  NA), sparseness = c(0.01, 1), scale.first.x = FALSE,
  scale.first.center.x = FALSE, scale.first.z = FALSE,
  scale.first.center.z = FALSE, resampler = "strat.boot", n.res = 4,
  stratify.var = NULL, train.p = 0.75, strat.n.bins = 5,
  target.length = NROW(z), its = 20, cthresh = c(0, 0), perms = 0,
  uselong = 0, row.sparseness = 0, smooth = 0, robust = 0,
  mycoption = 1, initializationList = list(),
  initializationList2 = list(), l1 = 0.05, doseg = TRUE,
  priorWeight = 0, verbose = TRUE, outdir = NULL,
  save.mod = ifelse(!is.null(outdir), TRUE, FALSE))

Arguments

x

Input matrix

z

Input matrix

x.test

(Optional) Testing set x matrix. Will be projected on vector solution

z.test

(Optional) Testing set z matrix. Will be projected on vector solution

k

Integer: Number of axes to project to (i.e. number of resulting dimensions you require)

sparseness

Float, length 2: Required sparseness for each matrix. Defaults to c(.01, 1)

scale.first.x

Logical: If TRUE, scale x before decomposition

scale.first.center.x

Logical: If TRUE, and scale.first.x is TRUE, also center x

scale.first.center.z

Logical: See above

resampler

Resampling method to use (with resample)#' @param

stratify.var

Numeric vector (optional): Variable used for stratification. Defaults to y

train.p

Float (0, 1): Fraction of cases to assign to traininig set for resampler = "strat.sub"

strat.n.bins

Integer: Number of groups to use for stratification for resampler = "strat.sub" / "strat.boot"

target.length

Integer: Number of cases for training set for resampler = "strat.boot". Default = length(y)

its

Integer: Number of iterations for ANTsR decomposition

cthresh

Integer, pair: Cluster threshold for ANTsR decomposition. Used for voxerlwise data Default = c(0, 0), which should be used for ROI data

perms

Integer: Number of permutations for ANTsR decomposition

uselong

Logical, binary: If 1, enforce solutions on each side to be the same. Default = 0. See ANTsR::sparseDecom2("uselong")

row.sparseness

Float (0, 1]: subject / case-space sparseness

smooth

Float: Smooth the data (only if mask is provided). Default = 0

robust

Logical, binary: If 1, Rank-transform input matrices. Default = 0

mycoption

Integer 0, 1, 2: Enforce 1. spatial orthogonality, 2. low-dimensional orthogonality or 0. both Default = 1

initializationList

List: Initialization for x. Default = list()

initializationList2

List: Initialixzation for z. Default = list()

l1

Float: L1 normalization. Default = .05

doseg

Logical: If TRUE, orthogonalize matrix after each resample

verbose

Logical: If TRUE, print messages to screen

scale.first

z Logical: See above

Details

This is based on ANTsR::sparseDecom2boot by Brian B. Avants

See Also

Other Cross-Decomposition: x.CCA, xdecomSelect