# \donttest{
if (requireNamespace("mlr3")) {
library(mlr3)
library(mlr3viz)
task = tsk("spam")
learner = lrn("classif.rpart", predict_type = "prob")
object = learner$train(task)$predict(task)
head(fortify(object))
autoplot(object)
autoplot(object, type = "roc")
autoplot(object, type = "prc")
}
# }
Run the code above in your browser using DataLab