# \donttest{
# This example assumes your package includes a dataset named 'train_dia'.
# If not, create a toy data frame first.
if (exists("train_dia")) {
initialize_modeling_system_dia()
bagging_rf_results <- bagging_dia(
data = train_dia,
base_model_name = "rf",
n_estimators = 5, # Reduced for a quick example
threshold_choices = "youden",
positive_label_value = 1,
negative_label_value = 0,
new_positive_label = "Case",
new_negative_label = "Control"
)
print_model_summary_dia("Bagging (RF)", bagging_rf_results)
}
# }
Run the code above in your browser using DataLab