Implements a Stacking Ensemble (Super Learner). It uses the risk scores from top-performing base models as meta-features to train a second-level meta-learner.
stacking_pro(
results_all_models,
data,
meta_model_name,
top = 3,
tune_meta = FALSE,
time_unit = "day",
years_to_evaluate = c(1, 3, 5),
seed = 789
)A list containing the stacking object and evaluation results.
List of results from models_pro().
Training data.
Name of the meta-learner (e.g., "lasso_pro").
Integer. Number of top base models to include based on C-index.
Logical. Tune the meta-learner?
Time unit.
Evaluation years.
Integer seed.