autoplot.EnsembleFSResult {mlr3viz}R Documentation

Plots for Ensemble Feature Selection Results

Description

Visualizations for EnsembleFSResult. The argument type determines the type of plot generated. The available options are:

Usage

## S3 method for class 'EnsembleFSResult'
autoplot(
  object,
  type = "pareto",
  pareto_front = "stepwise",
  stability_measure = "jaccard",
  stability_args = NULL,
  theme = theme_minimal(),
  ...
)

Arguments

object

(mlr3fselect::EnsembleFSResult).

type

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

pareto_front

(character(1))
Type of pareto front to plot. Can be "stepwise" (default), "estimated" or "none".

stability_measure

(character(1))
The stability measure to be used in case type = "stability". One of the measures returned by stabm::listStabilityMeasures() in lower case. Default is "jaccard".

stability_args

(list)
Additional arguments passed to the stability measure function.

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(mlr3fselect)

  set.seed (42)
  efsr = ensemble_fselect(
    fselector = fs("random_search"),
    task = tsk("sonar"),
    learners = lrns(c("classif.rpart", "classif.featureless")),
    init_resampling = rsmp("subsampling", repeats = 5),
    inner_resampling = rsmp("cv", folds = 3),
    measure = msr("classif.ce"),
    terminator = trm("evals", n_evals = 5)
  )

  # Pareto front (default, stepwise)
  autoplot(efsr)

  # Pareto front (estimated)
  autoplot(efsr, pareto_front = "estimated")

  # Performance
  autoplot(efsr, type = "performance")

  # Number of features
  autoplot(efsr, type = "n_features")

  # stability
  autoplot(efsr, type = "stability")
}


[Package mlr3viz version 0.9.0 Index]