tune.ridgeSIR: Cross-Validation for ridge SIR

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/ridgeSIR.R

Description

tune.ridgeSIR performs a Cross Validation for ridge SIR estimation

Usage

1
2
tune.ridgeSIR(x, y, listH, list_mu2, list_d, nfolds = 10, parallel = TRUE,
  ncores = NULL)

Arguments

x

explatory variables (numeric matrix or data frame)

y

target variable (numeric vector)

listH

list of the number of slices to be tested (numeric vector)

list_mu2

list of ridge regularization parameters to be tested (numeric vector)

list_d

list of the dimensions to be tested (numeric vector)

nfolds

number of folds for the cross validation. Default is 10

parallel

whether the computation should be performed in parallel or not. Logical. Default is FALSE

ncores

number of cores to use if parallel = TRUE. If left to NULL, all available cores minus one are used

Value

a data frame with tested parameters and corresponding CV error and estimation of R(d)

Author(s)

Victor Picheny, [email protected]

Remi Servien, [email protected]

Nathalie Villa-Vialaneix, [email protected]

References

Picheny, V., Servien, R. and Villa-Vialaneix, N. (2016) Interpretable sparse SIR for digitized functional data. Preprint.

See Also

ridgeSIR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
set.seed(1115)
tsteps <- seq(0, 1, length = 200)
nsim <- 100
simulate_bm <- function() return(c(0, cumsum(rnorm(length(tsteps)-1, sd=1))))
x <- t(replicate(nsim, simulate_bm()))
beta <- cbind(sin(tsteps*3*pi/2), sin(tsteps*5*pi/2))
y <- log(abs(x %*% beta[ ,1])) + sqrt(abs(x %*% beta[ ,2]))
y <- y + rnorm(nsim, sd = 0.1)
list_mu2 <- 10^(0:10)
listH <- c(5, 10)
list_d <- 1:4
set.seed(1129)
## Not run: 
res_tune <- tune.ridgeSIR(x, y, listH, list_mu2, list_d, 
                          nfolds = 10, parallel = TRUE)
## End(Not run)

SISIR documentation built on May 29, 2017, 8:31 p.m.