View source: R/performSelectionLoop.R
| performSelectionLoop | R Documentation |
Implements Stage 2 of the FSCRE algorithm: the iterative competitive selection using a proposer–arbiter mechanism. Candidate moves are proposed by a robust LARS step computed from the (robust) correlation inputs, and accepted by an arbiter based on cross-validated predictive improvement.
The function supports two CV preprocessing modes:
cv_preprocess = "global": CV is computed on the globally preprocessed
training data (x.imp, y.imp).
cv_preprocess = "foldwise": preprocessing is fitted on each CV fold's
training subset and applied to that fold's validation subset (via
cellWise::DDCpredict for x_preprocess="ddc" and by reusing the training
fold's location/scale for y_preprocess="wrap").
The selection step terminates when no candidate yields a strictly positive CV
improvement, or when the best relative improvement falls below tolerance.
performSelectionLoop(
Rx,
ry,
x,
y,
x.imp,
y.imp,
n_models,
max_predictors,
tolerance,
x_preprocess,
y_preprocess,
cv_preprocess,
cv_fit,
cv_loss,
cv_folds,
max_share = 1,
n_min = NULL
)
Rx |
Global predictor correlation matrix used by the LARS proposer (p x p). |
ry |
Global predictor-response correlation vector used by the LARS proposer (length p). |
x |
Raw design matrix (n x p). Used for foldwise preprocessing if requested. |
y |
Raw response vector (length n). Used for foldwise preprocessing if requested. |
x.imp |
Globally preprocessed design matrix (n x p), used when |
y.imp |
Globally preprocessed response vector (length n), used when |
n_models |
Number of models in the ensemble (K). |
max_predictors |
Maximum total number of predictors to select across all models. |
tolerance |
Relative improvement tolerance for stopping ( |
x_preprocess |
Character. Preprocessing method for predictors in the CV loop
(e.g., |
y_preprocess |
Character. Preprocessing method for response in the CV loop
(e.g., |
cv_preprocess |
Character. CV preprocessing mode: |
cv_fit |
Character. Inner CV fitting method used by |
cv_loss |
Character. CV scoring loss used by |
cv_folds |
Integer. Number of CV folds. |
max_share |
Integer. Maximum number of sub-models (1 to n_models) in which a given
variable may appear. Default is 1 (fully disjoint sub-models). For |
n_min |
Integer or NULL. Minimum number of variables each sub-model is guaranteed
(subject to availability under the |
A list with component:
active.setsA list of length n_models, where each element is an integer
vector of selected variable indices for that sub-model.
getLarsProposal, computeCVError, computeRobustFoundation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.