| select_ncomp | R Documentation |
Select the number of components for complete, imputed, or incomplete-data PLS workflows.
select_ncomp(
x,
y,
method = c("complete", "nipals_standard", "nipals_adaptative"),
criterion = c("Q2-LOO", "Q2-10fold", "AIC", "AIC-DoF", "BIC", "BIC-DoF"),
max_ncomp,
seed = NULL,
folds = 10L,
threshold = 0.0975
)
x |
Predictor matrix, dataset object, or |
y |
Numeric response vector. This may be omitted when |
method |
Selection workflow: |
criterion |
Selection criterion: |
max_ncomp |
Maximum number of components to consider. |
seed |
Optional random seed used by the cross-validation and imputation aggregation steps. |
folds |
Number of cross-validation folds used by |
threshold |
Threshold applied to |
A one-row data frame describing the selected component count.
sim <- simulate_pls_data(n = 25, p = 10, true_ncomp = 2, seed = 1)
select_ncomp(sim$x, sim$y, method = "complete", criterion = "AIC", max_ncomp = 4, seed = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.