autoplot.Filter: Plots for Filter Scores

View source: R/Filter.R

autoplot.FilterR Documentation

Plots for Filter Scores

Description

Visualizations for mlr3filters::Filter. The argument type controls what kind of plot is drawn. Possible choices are:

  • "barplot" (default): Bar plot of filter scores.

Usage

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

Arguments

object

(mlr3filters::Filter).

type

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

n

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

theme

(ggplot2::theme())
The ggplot2::theme_minimal() is applied by default to all plots.

...

(ignored).

Value

ggplot2::ggplot().

Examples

if (requireNamespace("mlr3")) {
  library(mlr3)
  library(mlr3viz)
  library(mlr3filters)

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

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

mlr3viz documentation built on July 1, 2024, 5:06 p.m.