# NOT RUN {
library("mlr3")
# Simple Bagging
gr = greplicate(n = 5,
  po("subsample") %>>%
  po("learner", lrn("classif.rpart"))
) %>>%
  po("classifavg")
resample(tsk("iris"), GraphLearner$new(gr), rsmp("holdout"))
# }
Run the code above in your browser using DataLab