autoplot.Filter: Plot for Filter Scores

Description Usage Arguments Value Examples

View source: R/Filter.R

Description

Generates plots for mlr3filters::Filter, depending on argument type:

Usage

1
2
## S3 method for class 'Filter'
autoplot(object, type = "boxplot", n = Inf, ...)

Arguments

object

(mlr3filters::Filter).

type

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

n

(integer(1))
Only include the first n features with highest importance. Defaults to all features.

...

(any): Additional argument, passed down to the respective geom.

Value

ggplot2::ggplot() object.

Examples

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

task = tsk("mtcars")
f = flt("correlation")
f$calculate(task)

head(fortify(f))
autoplot(f, n = 5)

Example output

   feature     score
1:      wt 0.8676594
2:     cyl 0.8521620
3:    disp 0.8475514
4:      hp 0.7761684
5:    drat 0.6811719
6:      vs 0.6640389

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