View source: R/plot_functions.R
plot.shapley_interaction | R Documentation |
Plot of Shapley interaction indices
## S3 method for class 'shapley_interaction'
plot(
x,
abbrev = 4,
title = "Shapley Interaction",
legend = TRUE,
text_size = 22,
...
)
x |
A |
abbrev |
Integer. If |
title |
Character. Title of the plot. |
legend |
Logical. If TRUE (default), a legend is plotted. |
text_size |
Integer. Size of the text in the plot |
... |
Optional arguments passed to methods. |
Returns a figure consisting of two panels. The upper panel shows the Shapley values, and the lower panel the Shapley interaction indices.
p <- 5
mu <- rep(0,p)
Sigma <- matrix(0.9, p, p); diag(Sigma) = 1
Sigma_inv <- solve(Sigma)
x <- c(0,1,2,2.3,2.5)
PHI <- shapley_interaction(x, mu, Sigma)
plot(PHI)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.