if (requireNamespace("rpart")) {
library("mlr3")
po("learner", lrn("classif.rpart"), cp = 0.3)
po(lrn("classif.rpart"), cp = 0.3)
# is equivalent with:
mlr_pipeops$get("learner", lrn("classif.rpart"),
param_vals = list(cp = 0.3))
mlr3pipelines::pos(c("pca", original = "nop"))
}
Run the code above in your browser using DataLab