ispca.cv {iSFun}R Documentation

Cross-validation for ispca

Description

Performs K-fold cross validation for the integrative sparse principal component analysis over a grid of values for the regularization parameter mu1 and mu2.

Usage

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

Arguments

x

list of data matrices, L datasets of explanatory 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.

mu2

numeric, the feasible set of contrasted penalty parameter.

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.

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 'ispca.cv' object that contains the list of the following items.

References

See Also

See Also as ispca.

Examples


# Load a list with 3 data sets
library(iSFun)
data("simData.pca")
x <- simData.pca$x
L <- length(x)
mu1 <- c(0.3, 0.5)
mu2 <- 0.002

res_homo_m <- ispca.cv(x = x, L = L, K = 5, mu1 = mu1, mu2 = mu2, pen1 = "homogeneity",
                       pen2 = "magnitude", scale.x = TRUE, maxstep = 50, submaxstep = 10)

res_homo_s <- ispca.cv(x = x, L = L, K = 5, mu1 = mu1, mu2 = mu2, pen1 = "homogeneity",
                       pen2 = "sign", scale.x = TRUE, maxstep = 50, submaxstep = 10)

mu1 <- c(0.1, 0.15)
mu2 <- 0.05
res_hete_m <- ispca.cv(x = x, L = L, K = 5, mu1 = mu1, mu2 = mu2, pen1 = "heterogeneity",
                       pen2 = "magnitude", scale.x = TRUE, maxstep = 50, submaxstep = 10)

res_hete_s <- ispca.cv(x = x, L = L, K = 5, mu1 = mu1, mu2 = mu2, pen1 = "heterogeneity",
                       pen2 = "sign", scale.x = TRUE, maxstep = 50, submaxstep = 10)


[Package iSFun version 1.1.0 Index]