plotPartialDependence: Partial Dependence Plot (PDP)

Description Usage Arguments Value See Also Examples

View source: R/plotPartialDependence.R

Description

Visualization of a partial dependence plot from a mlr3::Task object and a mlr3::Learner.

Usage

1
2
3
4
5
6
7
8
9
plotPartialDependence(
  task,
  features = NULL,
  learner = NULL,
  gridsize = 20,
  rug = TRUE,
  plotICE = TRUE,
  title = TRUE
)

Arguments

task

mlr3::Task object
A task for which the plot should be generated.

features

(character(1) | character(2))
The name of the features for which the partial dependence should be calculated. If no features are specified, the first two features of the task object will be plotted. The default is NULL.

learner

mlr3::Learner object
A learner for which the plot should be generated. If NULL, a random forest for regression or classification will be used. The default is NULL.

gridsize

(numeric(1))
The number of rectangles/sections per axis. The default is 20.

rug

(logical)
If TRUE, a rug will be plotted. The default is TRUE.

plotICE

(logical)
If TRUE, the individual conditional expectations (ICE) will be also plotted. It is only available if only one feature is chosen. The default is TRUE.

title

(logical)
If TRUE, the title will be plotted. The default is TRUE.

Value

A plotly object.

See Also

plotParallelCoordinate plotHeatmap plotImportance

Examples

1
2
3
4
library(mlr3)
data(glmnet_ela)
task_glmnet_ela = TaskRegr$new(id = "task_glmnet", backend = glmnet_ela, target = "logloss")
plotPartialDependence(task_glmnet_ela)

Pizzaknoedel/visualize-hyperparameter documentation built on Feb. 13, 2022, 8:11 a.m.