Skip to contents

Plot the robust regression or explanation from slise as an image

Usage

# S3 method for slise_mnist
plot(
  slise,
  title = NULL,
  labels = c("Low", "High"),
  partial = FALSE,
  width = floor(sqrt(ncol(slise$X))),
  height = width,
  plots = 1,
  enhance_colours = TRUE,
  ...,
  breaks = NULL
)

Arguments

slise

The slise object

title

The title of the plot (may include a `%s`, which will be replaced by the prediction)

labels

The class labels (vector with two strings: c(y_low, y_high), default: c("Low", "High"))

partial

Should the raw ggplot2 objects be returned instead of directly plotting (default: FALSE)

width

The width of the image (width * height == ncol(X))

height

The height of the image (width * height == ncol(X))

plots

The number of plots to split the explanation into (default: 1)

enhance_colours

Increse the saturation of the explanation (default: TRUE)

...

Ignored parameters

breaks

Breaks for the countours, see `ggplot2::stat_contour` (default: NULL)

Value

ggplot object(s) or plot