Run a sparse Canonical Correlation Analysis using the PMA
package
x.CCA(x, z, x.test = NULL, z.test = NULL, y = NULL, outcome = NULL,
k = 3, niter = 20, nperms = 50, permute.niter = 15,
typex = "standard", typez = "standard", penaltyx = NULL,
penaltyz = NULL, standardize = TRUE, upos = FALSE, vpos = FALSE,
verbose = TRUE, n.cores = rtCores, outdir = NULL,
save.mod = ifelse(!is.null(outdir), TRUE, FALSE), ...)
Matrix: Training x dataset
Matrix: Training z dataset
Matrix (Optional): Testing x set
Matrix (Optional): Testing z set
Outcome vector (Optional): If supplied, linear combinations of x
and z
need to be
additionaly correlated with this
String: Type of outcome y
: "survival", "multiclass", "quantitative"
Integer: Number of components
Integer: Number of iterations
Integer: Number of permutations to run with CCA.permute
The higher, the better.
Integer: Number of iterations to run for each permutation with CCA.permute
String: "standard", "ordered". Use "standard" if columns of x are unordered; lasso penalty is applied to enforce sparsity. Otherwise, use "ordered"; fused lasso penalty is applied, to enforce both sparsity and smoothness.
String: "standard", "ordered". Same as typex
for z dataset
Float: The penalty to be applied to the matrix x, i.e. the penalty that results in the canonical vector u. If typex is "standard" then the L1 bound on u is penaltyx*sqrt(ncol(x)). In this case penaltyx must be between 0 and 1 (larger L1 bound corresponds to less penalization). If "ordered" then it's the fused lasso penalty lambda, which must be non-negative (larger lambda corresponds to more penalization).
Float: The penalty to be applied to the matrix z, i.e. the penalty that results in the canonical vector v. If typez is "standard" then the L1 bound on v is penaltyz*sqrt(ncol(z)). In this case penaltyz must be between 0 and 1 (larger L1 bound corresponds to less penalization). If "ordered" then it's the fused lasso penalty lambda, which must be non-negative (larger lambda corresponds to more penalization).
Logical: If TRUE, center and scale columns of x
and z
Logical: Require elements of u to be positive
Logical: Require elements of v to be positive
Logical: Print messages, including trace
from x.CCA.permute
and
PMA::CCA
Integer: Number of cores to use
Path to output directory. Default = NULL
Logical: If TRUE, and outdir
is defined, will save trained CCA model to outdir
.
Default = TRUE if outdir
is set, otherwise FALSE
Additional arguments to be passed to PMA::CCA
#' x.CCA
runs PMA::CCA
. If penaltyx is NULL, penaltyx *and* penaltyz will be estimated automatically
using x.CCA.permute (adapted to run in parallel)
x.SD2RES also performs sparse decompositions / CCA using ANTsR
Other Cross-Decomposition: x.SD2RES
,
xdecomSelect