# \donttest{
# 1. Initialize the modeling system
initialize_modeling_system_dia()
# 2. Create an imbalanced toy dataset
set.seed(42)
n_obs <- 100
n_minority <- 10
data_imbalanced_toy <- data.frame(
ID = paste0("Sample", 1:n_obs),
Status = c(rep(1, n_minority), rep(0, n_obs - n_minority)),
Feat1 = rnorm(n_obs),
Feat2 = runif(n_obs)
)
# 3. Run the EasyEnsemble algorithm
# n_estimators is reduced for a quick example
easyensemble_results <- imbalance_dia(
data = data_imbalanced_toy,
base_model_name = "rf",
n_estimators = 3,
threshold_choices = "f1"
)
print_model_summary_dia("EasyEnsemble (RF)", easyensemble_results)
# }
Run the code above in your browser using DataLab