0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

SHAPのwaterfall図を複数配置する(How to draw multiple SHAP waterfalls)

Posted at

SHAP の waterfall図を複数配置するにはこんな感じで書けます:

sample.py
fig = plt.figure()
ax0 = fig.add_subplot(141)
shap.plots.waterfall(shap_values[1],  show=False)
ax1 = fig.add_subplot(142)
shap.plots.waterfall(shap_values[2],  show=False)
ax2 = fig.add_subplot(143)
shap.plots.waterfall(shap_values[3],  show=False)
ax3 = fig.add_subplot(144)
shap.plots.waterfall(shap_values[4],  show=False)
plt.gcf().set_size_inches(20,6) 
plt.tight_layout() 
plt.show()
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?