pyreal.visualize.feature_scatter_plot#

pyreal.visualize.feature_scatter_plot(explanation, feature, predictions=None, discrete=None, show=False, filename=None, palette=None, marker_alpha=0.5, marker_size=3, **kwargs)[source]#

Plot a contribution scatter plot for one feature

Parameters:
  • explanation (DataFrame or FeatureBased) – One output DataFrame from RealApp.produce_feature_contributions OR FeatureContributions explanation object

  • feature (column label) – Label of column to visualize

  • predictions (array-like of length n_instances) – Predictions corresponding to explained instances

  • discrete (Boolean) – If true, plot x as discrete data. Defaults to True if x is not numeric.

  • show (Boolean) – If True, show the figure

  • filename (string or None) – If not None, save the figure as filename

  • palette (seaborn palette name, list, or dict) – Colors to use in the plot. See seaborn.color_palette for more info

  • marker_alpha (float between (0,1]) – Alpha value to use for markers

  • marker_size (int) – Size to use for markers

  • **kwargs – Additional arguments to pass into seaborn.stripplot or seaborn.scatterplot