June 10, 2024

Fix SHAP Multiclass Summary Plot – Downgrade to v0.44.1 from 0.45.0

Fix SHAP Multiclass Summary Plot – Downgrade to v0.44.1 from 0.45.0

Here’s a helpful tip for anyone using SHAP (SHapley Additive exPlanations):

If you’re trying to use shap.summary_plot(shap_values, X_train_tfidf_dense, plot_type="bar") for a multiclass summary, and it keeps showing a dotted interaction plot regardless of the plot type you pass; it’s likely a bug in v0.45.0.

Downgrading to v0.44.1 fixed it for me. Hope this saves someone time! 👍ExplainableAI


For those who don’t know what SHAP is, it’s a framework that can explain why your  that specific prediction and what features contributed to that output.

SHAP (SHapley Additive exPlanations) is a game-theoretic approach to explaining the output of any machine learning model. It connects optimal credit allocation with local explanations using the classic Shapley values from game theory and their related extensions.


Below is a straightforward code to demonstrate the issue:

Here are the screenshots for both versions:

Share this Story:
  • facebook
  • twitter
  • gplus

Leave a comment