autoplot.TaskClassif: Plot for Classification Tasks

Description Usage Arguments Value Examples

View source: R/TaskClassif.R

Description

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

Usage

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

Arguments

object

(mlr3::TaskClassif).

type

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

...

(any): Additional argument, possibly passed down to the underlying plot functions.

Value

ggplot2::ggplot() object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(mlr3)
library(mlr3viz)

task = tsk("iris")

head(fortify(task))
autoplot(task)
autoplot(task$clone()$select(c("Sepal.Length", "Sepal.Width")),
  type = "pairs")
autoplot(task, type = "duo")

Example output

   Species Petal.Length Petal.Width Sepal.Length Sepal.Width
1:  setosa          1.4         0.2          5.1         3.5
2:  setosa          1.4         0.2          4.9         3.0
3:  setosa          1.3         0.2          4.7         3.2
4:  setosa          1.5         0.2          4.6         3.1
5:  setosa          1.4         0.2          5.0         3.6
6:  setosa          1.7         0.4          5.4         3.9
Registered S3 method overwritten by 'GGally':
  method from   
  +.gg   ggplot2
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

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