Ranks features by a composite score that rewards within-cohort discrimination (outcome AUC) while penalising features that separate cohorts (batch confounding) or have inconsistent performance across cohorts (AUC variance).

select_discriminative_features(
  x_list,
  y_list,
  n_features = 50L,
  lambda_cohort = 1,
  lambda_sd = 1,
  min_auc = 0.6,
  assay = NULL
)

Arguments

x_list

A matrix-like object, SummarizedExperiment, or list of such objects. Rows represent samples and columns represent features.

y_list

A binary response aligned with x_list. Must be a factor with levels c("No", "Yes"). Provide a list when x_list is a list.

n_features

Maximum number of features to return (default 50).

lambda_cohort

Penalty weight for cohort discrimination (default 1.0). Higher values more aggressively penalise features that separate cohorts.

lambda_sd

Penalty weight for cross-cohort AUC variability (default 1.0). Higher values favour features with consistent AUC across cohorts.

min_auc

Minimum mean within-cohort AUC required (default 0.6). Features below this threshold are excluded before ranking.

assay

For SummarizedExperiment inputs, the assay name or index to extract prior to analysis.

Value

A list with components:

features

Character vector of selected feature names.

scores

Data frame with per-feature scoring metadata: feature, mean_auc, sd_auc, min_auc, cohort_disc, score.

per_cohort_auc

Matrix of within-cohort AUC values (features x cohorts).

settings

List of parameter values used.

Details

The composite score for feature \(j\) is: $$score_j = \bar{AUC}_j - \lambda_1 \cdot cohort\_disc_j - \lambda_2 \cdot sd(AUC_j)$$

where \(\bar{AUC}_j\) is the mean within-cohort AUC, \(cohort\_disc_j\) measures how well feature \(j\) separates cohorts (irrespective of outcome), and \(sd(AUC_j)\) captures cross-cohort variability.