autoplot.PredictionClassif: Plot for PredictionClassif

Description Usage Arguments Value References Examples

View source: R/PredictionClassif.R

Description

Generates plots for mlr3::PredictionClassif, depending on argument type:

Usage

1
2
## S3 method for class 'PredictionClassif'
autoplot(object, type = "stacked", ...)

Arguments

object

(mlr3::PredictionClassif).

type

(character(1)):
Type of the plot. See description.

...

(any): Additional arguments, passed down to the respective geom or plotting function.

Value

ggplot2::ggplot() object.

References

Saito T, Rehmsmeier M (2017). “Precrec: fast and accurate precision-recall and ROC curve calculations in R.” Bioinformatics, 33(1), 145-147. doi: 10.1093/bioinformatics/btw570.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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")

mlr3viz documentation built on July 2, 2021, 1:07 a.m.