ispls.cv: Cross-validation for ispls

Description Usage Arguments Value References See Also Examples

View source: R/ispls.cv.R

Description

Performs K-fold cross validation for the integrative sparse partial least squares over a grid of values for the regularization parameter mu1 and mu2.

Usage

1
2
3
ispls.cv(x, y, L, K, mu1, mu2, eps = 1e-04, kappa = 0.05,
  pen1 = "homogeneity", pen2 = "magnitude", scale.x = TRUE,
  scale.y = TRUE, maxstep = 50)

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.

mu2

numeric, the feasible set of contrasted penalty parameter.

eps

numeric, the threshold at which the algorithm terminates.

kappa

numeric, 0 < kappa < 0.5 and the parameter reduces the effect of the concave part of objective function.

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.

Value

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

References

See Also

See Also as ispls.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Load a list with 3 data sets
library(iSFun)
data("simData.pls")
x <- simData.pls$x
y <- simData.pls$y
L <- length(x)
mu1 <- c(0.04, 0.05)
mu2 <- 0.25

res_homo_m <- ispls.cv(x = x, y = y, L = L, K = 5, mu1 = mu1, mu2 = mu2, eps = 1e-2,
                       kappa = 0.05, pen1 = "homogeneity", pen2 = "magnitude",
                       scale.x = TRUE, scale.y = TRUE, maxstep = 50)

res_homo_s <- ispls.cv(x = x, y = y, L = L, K = 5, mu1 = mu1, mu2 = mu2, eps = 1e-2,
                       kappa = 0.05, pen1 = "homogeneity", pen2 = "sign",
                       scale.x = TRUE, scale.y = TRUE, maxstep = 50)

res_hete_m <- ispls.cv(x = x, y = y, L = L, K = 5, mu1 = mu1, mu2 = mu2, eps = 1e-2,
                       kappa = 0.05, pen1 = "heterogeneity", pen2 = "magnitude",
                       scale.x = TRUE, scale.y = TRUE, maxstep = 50)

res_hete_s <- ispls.cv(x = x, y = y, L = L, K = 5, mu1 = mu1, mu2 = mu2, eps = 1e-2,
                       kappa = 0.05, pen1 = "heterogeneity", pen2 = "sign",
                       scale.x = TRUE, scale.y = TRUE, maxstep = 50)

iSFun documentation built on Oct. 4, 2021, 9:06 a.m.

Related to ispls.cv in iSFun...