plot.BayesNnet: Plot a Bayesian Neural Network

View source: R/nnet.R

plot.BayesNnetR Documentation

Plot a Bayesian Neural Network

Description

The default plot is a barplot of the marginal inclusion probabilities for each variable, as obtained by PlotMarginalInclusionProbabilities. Other interesting plots can be obtained by supplying a string as the second argument.

Usage

  ## S3 method for class 'BayesNnet'
plot(x,
     y = c("predicted", "residual", "structure", "partial", "help"),
     ...)

  PlotBayesNnetPredictions(model, burn = SuggestBurn(model), ...)

  PlotBayesNnetResiduals(model, burn = SuggestBurn(model), ...)

  PlotNetworkStructure(model, ...)

Arguments

model

An object of class BayesNnet.

x

An object of class BayesNnet. The name x is required to conform with the plot generic function signature.

y

The type of plot desired, or the name of the variable to plot against. The name y is required to conform with the plot generic function signature.

If y matches (or partially matches) one of the names in the function signature, then the corresponding plot function handles the plot request.

  • "predicted" (the default) plot actual vs predicted values using PlotBayesNnetPredictions.

  • "residual" plot residuals vs predicted values using PlotBayesNnetResiduals.

  • "structure" plot network structure using PlotNetworkStructure.

  • "partial" Draw the partial dependence plot for each predictor variable in the training data. This is an expensive plot. It might take a while to draw for large data sets or complex models.

  • "help" show this help page in a browser

If y fails to match any of the above, but it (partially) the name of one of the variables in the training data, then a partial dependence plot vs that variable is produced.

burn

The number of MCMC iterations to discard as burn-in.

...

Additional arguments passed to the specific functions that do the plotting. For residual and predicted plots that is the plot function. For network structure it is plot.igraph. For partial dependence plots it is PartialDependencePlot.

Details

Residual and predicted plots should be self explanatory. The network structure plot is fairly standard for neural network models. The width of a line linking two nodes is determined by the absolute value of the corresponding coefficient.

Author(s)

Steven L. Scott

See Also

BayesNnet PartialDependencePlot

Examples

  ## See the examples in ?BayesNnet

BoomSpikeSlab documentation built on May 29, 2024, 5:07 a.m.