View source: R/plots_Shapley.r
| plot_bar_int_Shapley_decomp | R Documentation |
Barplot of Shapley value decomposition into contributions of (Centers, Ranges, and CrossCentersRanges) for interval-valued data.
plot_bar_int_Shapley_decomp(
shapley_decomp,
palette = NULL,
rotate_x = TRUE,
abbrev.obs = 20,
sort.obs = TRUE,
plot_IMah = FALSE
)
shapley_decomp |
A list of matrices containing the Shapley value decomposition into contributions of (Centers, Ranges, and CrossCentersRanges) for each observation. |
palette |
A vector with colors for each feature. If |
rotate_x |
Logical. If |
abbrev.obs |
Integer. If |
sort.obs |
Logical. If |
plot_IMah |
Logical. If |
Returns a barplot that displays the Shapley value decomposition into contributions of (Centers, Ranges, and CrossCentersRanges) for each observation.
# Create intData object
data(creditcard)
credit_card_int <- creditcard$intData
# Compute Shapley decomposition into contributions of Centers, Ranges, and CrossCentersRanges
# based on IMCD estimates of mean and covariance matrix
credit_card_shap_decomp <- int_Shapley_decomp(credit_card_int)
# Plot Shapley decomposition with contributions of Centers, Ranges, and CrossCentersRanges
plot_bar_int_Shapley_decomp(credit_card_shap_decomp, palette = rainbow(credit_card_int@NIVar))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.