# \donttest{
# 1. Initialize the modeling system
initialize_modeling_system_dia()
# 2. Create a toy dataset for demonstration
set.seed(42)
data_toy <- data.frame(
ID = paste0("Sample", 1:60),
Status = sample(c(0, 1), 60, replace = TRUE),
Feat1 = rnorm(60),
Feat2 = runif(60)
)
# 3. Generate mock base model results (as if from models_dia)
base_model_results <- models_dia(
data = data_toy,
model = c("rf", "lasso"),
seed = 123
)
# 4. Run the soft voting ensemble
soft_voting_results <- voting_dia(
results_all_models = base_model_results,
data = data_toy,
type = "soft",
weight_metric = "AUROC",
top = 2,
threshold_choices = "f1"
)
print_model_summary_dia("Soft Voting", soft_voting_results)
# }
Run the code above in your browser using DataLab