iscca.cv: Cross-validation for iscca

View source: R/iscca.cv.R

iscca.cvR Documentation

Cross-validation for iscca

Description

Performs K-fold cross validation for the integrative sparse canonical correlation analysis over a grid of values for the regularization parameter mu1, mu2, mu3 and mu4.

Usage

iscca.cv(x, y, L, K = 5, mu1, mu2, mu3, mu4, eps = 1e-04,
  pen1 = "homogeneity", pen2 = "magnitude", scale.x = TRUE,
  scale.y = TRUE, maxstep = 50, submaxstep = 10)

Arguments

x

list of data matrices, L datasets of explanatory variables.

y

list of data matrices, L datasets of dependent variables.

L

numeric, number of datasets.

K

numeric, number of cross-validation folds. Default is 5.

mu1

numeric, the feasible set of sparsity penalty parameter for vector u.

mu2

numeric, the feasible set of contrasted penalty parameter for vector u.

mu3

numeric, the feasible set of sparsity penalty parameter for vector v.

mu4

numeric, the feasible set of contrasted penalty parameter for vector v.

eps

numeric, the threshold at which the algorithm terminates.

pen1

character, "homogeneity" or "heterogeneity" type of the sparsity structure. If not specified, the default is homogeneity.

pen2

character, "magnitude" or "sign" based contrasted penalty. If not specified, the default is magnitude.

scale.x

character, "TRUE" or "FALSE", whether or not to scale the variables x. The default is TRUE.

scale.y

character, "TRUE" or "FALSE", whether or not to scale the variables y. The default is TRUE.

maxstep

numeric, maximum iteration steps. The default value is 50.

submaxstep

numeric, maximum iteration steps in the sub-iterations. The default value is 10.

Value

An 'iscca.cv' object that contains the list of the following items.

  • x: list of data matrices, L datasets of explanatory variables with centered columns. If scale.x is TRUE, the columns of L datasets are standardized to have mean 0 and standard deviation 1.

  • y: list of data matrices, L datasets of dependent variables with centered columns. If scale.y is TRUE, the columns of L datasets are standardized to have mean 0 and standard deviation 1.

  • mu1: the sparsity penalty parameter selected from the feasible set of parameter mu1 provided by users.

  • mu2: the contrasted penalty parameter selected from the feasible set of parameter mu2 provided by users.

  • mu3: the sparsity penalty parameter selected from the feasible set of parameter mu3 provided by users.

  • mu4: the contrasted penalty parameter selected from the feasible set of parameter mu4 provided by users.

  • fold: The fold assignments for cross-validation for each observation.

  • loading.x: the estimated canonical vector of variables x with selected tuning parameters.

  • loading.y: the estimated canonical vector of variables y with selected tuning parameters.

  • variable.x: the screening results of variables x.

  • variable.y: the screening results of variables y.

  • meanx: list of numeric vectors, column mean of the original datasets x.

  • normx: list of numeric vectors, column standard deviation of the original datasets x.

  • meany: list of numeric vectors, column mean of the original datasets y.

  • normy: list of numeric vectors, column standard deviation of the original datasets y.

See Also

See Also as iscca.

Examples


# Load a list with 3 data sets
library(iSFun)
data("simData.cca")
x <- simData.cca$x
y <- simData.cca$y
L <- length(x)
mu1 <- c(0.2, 0.4)
mu3 <- 0.4
mu2 <- mu4 <- 2.5

res_homo_m <- iscca.cv(x = x, y = y, L = L, K = 5, mu1 = mu1, mu2 = mu2, mu3 = mu3,
                       mu4 = mu4, eps = 1e-2, pen1 = "homogeneity", pen2 = "magnitude",
                       scale.x = TRUE, scale.y = TRUE, maxstep = 50, submaxstep = 10)

res_homo_s <- iscca.cv(x = x, y = y, L = L, K = 5, mu1 = mu1, mu2 = mu2, mu3 = mu3,
                       mu4 = mu4, eps = 1e-2, pen1 = "homogeneity", pen2 = "sign",
                       scale.x = TRUE, scale.y = TRUE, maxstep = 50, submaxstep = 10)

mu1 <- mu3 <- c(0.1, 0.3)
mu2 <- mu4 <- 2
res_hete_m <- iscca.cv(x = x, y = y, L = L, K = 5, mu1 = mu1, mu2 = mu2, mu3 = mu3,
                       mu4 = mu4, eps = 1e-2, pen1 = "heterogeneity", pen2 = "magnitude",
                       scale.x = TRUE, scale.y = TRUE, maxstep = 50, submaxstep = 10)

res_hete_s <- iscca.cv(x = x, y = y, L = L, K = 5, mu1 = mu1, mu2 = mu2, mu3 = mu3,
                       mu4 = mu4, eps = 1e-2, pen1 = "heterogeneity", pen2 = "sign",
                       scale.x = TRUE, scale.y = TRUE, maxstep = 50, submaxstep = 10)


iSFun documentation built on March 18, 2022, 7:41 p.m.

Related to iscca.cv in iSFun...