Description Usage Arguments Value
View source: R/Crossval_OmicsPLS.R
Perform cross-validation to find the optimal number of variables/groups to keep for each joint component
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | crossval_sparsity(
X,
Y,
n,
nx,
ny,
nr_folds,
keepx_seq = NULL,
keepy_seq = NULL,
groupx = NULL,
groupy = NULL,
tol = 1e-10,
max_iterations = 100
)
|
X |
Numeric matrix. Vectors will be coerced to matrix with |
Y |
Numeric matrix. Vectors will be coerced to matrix with |
n |
Integer. Number of joint PLS components. Must be positive. |
nx |
Integer. Number of orthogonal components in X. Negative values are interpreted as 0 |
ny |
Integer. Number of orthogonal components in Y. Negative values are interpreted as 0 |
nr_folds |
Integer. Number of folds of CV |
keepx_seq |
Numeric vector. A vector indicating how many variables/groups to keep for CV in each of the joint component of X. Sparsity of each joint component will be selected sequentially. |
keepy_seq |
Numeric vector. A vector indicating how many variables/groups to keep for CV in each of the joint component of Y. Sparsity of each joint component will be selected sequentially. |
groupx |
Vector. Used when |
groupy |
Vector. Used when |
tol |
Double. Threshold for which the NIPALS method is deemed converged. Must be positive. |
max_iterations |
Integer. Maximum number of iterations for the NIPALS method. |
A list containing
x_1sd |
A vector with length n, giving the optimal number of variables/groups to keep for each X-joint compoent. One standard error rule is applied |
y_1sd |
A vector with length n, giving the optimal number of variables/groups to keep for each Y-joint compoent. One standard error rule is applied |
x |
A vector with length n, giving the optimal number of variables/groups to keep for each X-joint compoent, without applying the one standard error rule |
y |
A vector with length n, giving the optimal number of variables/groups to keep for each Y-joint compoent, without applying the one standard error rule |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.