Learn R Programming

LBBNN (version 0.1.2)

plot.LBBNN_Net: Plot LBBNN_Net objects

Description

Given a trained LBBNN_Net model, this function produces either:

  • Global plot: a visualization of the network structure, showing only the active paths.

  • Local explanation: a plot of the local explanation for a single input sample, including error bars obtained from Monte Carlo sampling of the network weights.

Usage

# S3 method for LBBNN_Net
plot(x, type = c("global", "local"), data = NULL, num_samples = 100, ...)

Value

No return value. Called for its side effects of producing a plot.

Arguments

x

An instance of LBBNN_Net.

type

Either "global" or "local".

data

If local is chosen, one sample must be provided to obtain the explanation. Must be a torch::torch_tensor of shape (1,p).

num_samples

integer, how many samples to use for model averaging over the weights in case of local explanations.

...

further arguments passed to or from other methods.