Learn R Programming

iml (version 0.11.2)

plot.Interaction: Plot Interaction

Description

plot.Interaction() plots the results of an Interaction object.

Usage

# S3 method for Interaction
plot(x, sort = TRUE)

Value

ggplot2 plot object

Arguments

x

An Interaction R6 object

sort

logical. Should the features be sorted in descending order? Defaults to TRUE.

See Also

Interaction

Examples

Run this code
# We train a tree on the Boston dataset:
if (FALSE) {
library("rpart")
data("Boston", package = "MASS")
rf <- rpart(medv ~ ., data = Boston)
mod <- Predictor$new(rf, data = Boston)

# Compute the interactions
ia <- Interaction$new(mod)

# Plot the results directly
plot(ia)
}

Run the code above in your browser using DataLab