How to display shap waterfall plot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 07:00 AM
Hi,
I have managed to display force plot for a single observation using the advice from this thread:
Solved: How to display SHAP plots? - Databricks - 28315
But is there anyway to display the newer "waterfall"-plot
shap.plots.waterfall — SHAP latest documentation
When running
shap.plots.waterfall(shap_values[0])
I get output like
Out[105]: <Figure size 576x468 with 3 Axes>
I have tried calling:
- plt.show()
- display()
- display(plt.gcf())
But same result. Any advice? Is it supposed to work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 04:56 AM
Thank you for the swift response.
I made a minimal example and it does work as you said. However when I try with my own model it does not work, the only output is
<Figure size 576x468 with 3 Axes>
I tried to save the figure as a file and then I do get a plot, but it does look a little broken.

