This function applies different criteria to visualize SHAP contributions
shapley.domain(
shapley,
domains,
plot = "bar",
legendstyle = "continuous",
scale_colour_gradient = NULL,
print = FALSE
)
ggplot object
object of class 'shapley', as returned by the 'shapley' function
character list, specifying the domains for grouping the features' contributions. Domains are clusters of features' names, that can be used to compute WMSHAP at higher level, along with their 95 better understand how a cluster of features influence the outcome. Note that either of 'features' or 'domains' arguments can be specified at the time.
character, specifying the type of the plot, which can be either 'bar', 'waffle', or 'shap'. The default is 'bar'.
character, specifying the style of the plot legend, which can be either 'continuous' (default) or 'discrete'. the continuous legend is only applicable to 'shap' plots and other plots only use 'discrete' legend.
character vector for specifying the color gradients for the plot.
logical. if TRUE, the WMSHAP summary table for the given row is printed
E. F. Haghish