Learn R Programming

sNPLS (version 0.1.3)

repeat_cv: Repeated cross-validation for sNPLS models

Description

Performs repeated cross-validation and represents results in a plot

Usage

repeat_cv(X_npls, Y_npls, ncomp = 1:3, keepJ = 1:ncol(X_npls), keepK = 1:dim(X_npls)[3], nfold = 10, parallel = TRUE, free_cores = 2, times = 30)

Arguments

X_npls
A three-way array containing the predictors.
Y_npls
A matrix containing the response.
ncomp
A vector with the different number of components to test
keepJ
A vector with the different number of selected variables to test
keepK
A vector with the different number of selected 'times' to test
nfold
Number of folds for the cross-validation
parallel
Should the computations be performed in parallel?
free_cores
If parallel computations are performed how many cores are left unused
times
Number of repetitions of the cross-validation

Value

A density plot with the results of the cross-validation