pyreal.visualize.strip_plot#
- pyreal.visualize.strip_plot(explanation, type='strip', num_features=5, discrete=False, show=False, filename=None, marker_size=3, palette=None, show_legend=True, **kwargs)[source]#
Generates a strip plot (type=”strip”) or a swarm plot (type=”swarm”) from a set of feature contributions.
- Parameters:
explanation (DataFrame or FeatureBased) – One output DataFrame from RealApp.produce_feature_contributions OR FeatureContributions explanation object
(String (type) – The type of plot to generate
["strip" (one of) – The type of plot to generate
"swarm"] – The type of plot to generate
num_features (int) – Number of features to show
discrete (Boolean) – If true, give discrete legends for each row. Otherwise, give a colorbar legend
show (Boolean) – If True, show the figure
filename (string or None) – If not None, save the figure as filename
marker_size (int) – Size of markers to use in plot
palette (seaborn palette name, list, or dict) – Colors to use in the plot. See seaborn.color_palette for more info
show_legend (Boolean) – If False, hide the legend
**kwargs – Additional arguments to pass to seaborn.swarmplot or seaborn.stripplot