cv_snplsInternal function for cv_snpls
cv_fit(
xtrain,
ytrain,
xval,
yval,
ncomp,
threshold_j = NULL,
threshold_k = NULL,
keepJ = NULL,
keepK = NULL,
method,
...
)A three-way training array
A response training matrix
A three-way test array
A response test matrix
Number of components for the sNPLS model
Threshold value on Wj. Scaled between [0, 1)
Threshold value on Wk. Scaled between [0, 1)
Number of variables to keep for each component, ignored if threshold_j is provided
Number of 'times' to keep for each component, ignored if threshold_k is provided
Select between sNPLS, sNPLS-SR or sNPLS-VIP
Further arguments passed to sNPLS
Returns the CV mean squared error