R/optimize_panel_transferable.R
optimize_panel_transferable.RdDeprecated thin wrapper. Use optimize_panel() directly, with
fitness_mode, train_ratio, and val_ratio: the train/validation/
held-out split and the "within_cohort_val" / "within_cohort_rotating" /
"loco" fitness strategies this function used to implement are now part of
optimize_panel() itself (a held-out share exists whenever
train_ratio + val_ratio < 1).
When feature_pool is NULL, this wrapper still partitions the data and
runs select_transferable_features() on the training partition only, so
the old leakage-safe auto-selection behaviour survives for one release;
pass feature_pool explicitly (or call select_transferable_features()
yourself and pass its result) to skip that step and call optimize_panel()
directly instead.
optimize_panel_transferable(
x,
y,
objectives = define_objectives(metrics = c("sensitivity", "specificity",
"num_features")),
max_features = 5L,
feature_pool = NULL,
train_ratio = 0.7,
val_ratio = 0.2,
np_alpha = 0.15,
np_delta = 0.05,
feature_transform = "pairwise_ratios",
feature_alignment = "intersection",
constraints = list(),
algorithm = c("NSGA-III", "NSGA-II"),
nsga_control = list(),
assay = NULL,
seed = 42L,
regularized = TRUE,
regularized_alpha = 0.5,
selection_threshold = "adaptive",
n_top_features = 50L,
fitness_mode = c("within_cohort_val", "within_cohort_rotating", "loco"),
n_val_splits = 10L,
record_history = FALSE
)List of matrix-like objects representing cohorts.
List of binary response vectors aligned with x.
Named list of objective descriptors as returned by
define_objectives().
Maximum number of base biomarkers permitted in a panel.
Optional subset of feature identifiers. If NULL,
select_transferable_features() is run on training data only.
Proportion of each cohort for training (default 0.7).
Proportion of each cohort for validation (default 0.2).
Type I error rate for Neyman-Pearson threshold (default 0.15).
Stored in the result for use by calibrate_panel().
Tolerance for NP threshold selection (default 0.05).
Stored in the result for use by calibrate_panel().
Transformation applied to selected base features
on-the-fly during optimization (default "pairwise_ratios"). See
feature_transform_registry() for options.
Strategy for aligning features across cohorts
(default "intersection").
Optional list of constraint descriptors.
Multi-objective algorithm: "NSGA-III" (default) or
"NSGA-II".
Named list of arguments passed to rmoo.
For SummarizedExperiment inputs, assay name or index.
Integer seed for reproducibility (default 42L, as in
optimize_panel()). When NULL and feature_pool is also NULL, a seed
is drawn and reused for both the feature-selection partition and the
optimize_panel() call, so the two partitions match and held-out samples
never leak into feature selection.
Logical; if TRUE (default), use regularized regression.
Elastic net mixing parameter (default 0.5).
Either a fixed numeric threshold in (0,1) for
feature selection, or "adaptive" (default) to use gap-based selection
that allows variable panel sizes in the Pareto front. See
optimize_panel() for details.
Number of top features to select via
select_transferable_features() when feature_pool is NULL (default 50).
Fitness-evaluation strategy: "within_cohort_val"
(default), "within_cohort_rotating", or "loco". See
optimize_panel() for the description of each.
Number of rotating train/val splits to pre-compute
when fitness_mode = "within_cohort_rotating" (default 10).
Logical; if TRUE, capture the population, fitness,
and NSGA rank at every generation and attach the result to the returned
OptimizationResult. Retrieve via nsga_history(). Default FALSE.
An OptimizationResult containing Pareto-optimal solutions and
held-out data for downstream calibration. Use summarize_solutions() to
inspect solutions, fit_panel() to fit a model, calibrate_panel() for
NP threshold calibration, and evaluate_panel() for validation.