performSelectionLoop: FSCRE Competitive Selection Loop (Internal)

View source: R/performSelectionLoop.R

performSelectionLoopR Documentation

FSCRE Competitive Selection Loop (Internal)

Description

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.

Usage

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
)

Arguments

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 cv_preprocess="global".

y.imp

Globally preprocessed response vector (length n), used when cv_preprocess="global".

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 (\tau).

x_preprocess

Character. Preprocessing method for predictors in the CV loop (e.g., "ddc" or "none").

y_preprocess

Character. Preprocessing method for response in the CV loop (e.g., "wrap", "robust_z", or "none").

cv_preprocess

Character. CV preprocessing mode: "global" or "foldwise".

cv_fit

Character. Inner CV fitting method used by computeCVError (e.g., "ls" or "huber").

cv_loss

Character. CV scoring loss used by computeCVError (e.g., "mse", "trimmed", or "huber").

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 1 < max_share < n_models, each sub-model's first selected variable is forced distinct across sub-models; sharing is only permitted afterward. This restriction is lifted when max_share = n_models.

n_min

Integer or NULL. Minimum number of variables each sub-model is guaranteed (subject to availability under the max_share/diversity pool restrictions), even if no candidate clears the usual positive-benefit or tolerance requirement. Default is NULL (no floor enforced, original behavior).

Value

A list with component:

active.sets

A list of length n_models, where each element is an integer vector of selected variable indices for that sub-model.

See Also

getLarsProposal, computeCVError, computeRobustFoundation


srlars documentation built on Sept. 23, 2026, 5:10 p.m.