# \donttest{
if (mlr3misc::require_namespaces("precrec", quietly = TRUE)) {
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