Learn R Programming

LBBNN (version 0.1.2)

plot_local_explanations_gradient: Plot the gradient based local explanations for one sample with input-skip LBBNNs.

Description

Plots the contribution of each covariate, and the prediction, with error bars.

Usage

plot_local_explanations_gradient(
  model,
  input_data,
  num_samples,
  device = "cpu",
  save_svg = NULL
)

Value

This function produces plots as a side effect and does not return a value.

Arguments

model

An instance of LBBNN_Net with input-skip enabled.

input_data

The data to be explained (one sample).

num_samples

integer, how many sample to use to produce credible intervals.

device

character, the device to be trained on. Default is cpu. Can be 'mps' or 'gpu'.

save_svg

the path where the plot will be saved as svg, if save_svg is not NULL.