# NOT RUN {
library("mlr3")
# Create example task
data_example = smotefamily::sample_generator(1000, ratio = 0.80)
task = TaskClassif$new(id = "example", backend = data_example, target = "result")
task$data()
table(task$data()$result)
# Generate synthetic data for minority class
pop = po("smote")
smotedata = pop$train(list(task))[[1]]$data()
table(smotedata$result)
# }
Run the code above in your browser using DataCamp Workspace