This implements a sparse and graph-regularized version of CCA based on the AppGrad style of implementation by Ma, Lu and Foster, 2015.

smoothAppGradCCA(
  x,
  y,
  smoox = NA,
  smooy = NA,
  sparsenessQuantile = 0.5,
  positivity = "either",
  k = 2,
  iterations = 10,
  stochastic = NA,
  initialization = "randxy",
  verbose = FALSE
)

Arguments

x

input view 1 matrix

y

input view 2 matrix

smoox

smoothingMatrix for x

smooy

smoothingMatrix for y

sparsenessQuantile

quantile to control sparseness - higher is sparser

positivity

restrict to positive or negative solution (beta) weights. choices are positive, negative or either as expressed as a string.

k

number of basis vectors to compute

iterations

number of gradient descent iterations

stochastic

size of subset to use for stocastic gradient descent

initialization

type of initialization, currently only supports a character randxy

verbose

boolean option

Value

list with matrices each of size p or q by k

Examples

mat<-replicate(100, rnorm(20)) mat2<-replicate(100, rnorm(20)) mat<-scale(mat) mat2<-scale(mat2) wt<-0.666 mat3<-mat*wt+mat2*(1-wt) jj = smoothAppGradCCA( mat, mat3 )