- shap.plots.image(shap_values, pixel_values=None, labels=None, width=20, aspect=0.2, hspace=0.2, labelpad=None, show=True)
Plots SHAP values for image inputs.
List of arrays of SHAP values. Each array has the shap (# samples x width x height x channels), and the length of the list is equal to the number of model outputs that are being explained.
Matrix of pixel values (# samples x width x height x channels) for each image. It should be the same shape as each array in the shap_values list of arrays.
List of names for each of the model outputs that are being explained. This list should be the same length as the shap_values list.
The width of the produced matplotlib plot.
How much padding to use around the model output labels.
Whether matplotlib.pyplot.show() is called before returning. Setting this to False allows the plot to be customized further after it has been created.