
Моя попытка: Затем я попытался в библиотеке найти summary_plot, но не смог найти никакой информации. Затем я попытался использовать shap.plots.bar, но это привело к ошибке такого типа. Надеюсь, вы поможете мне построить гистограмму с накоплением, как показано по ссылке выше, в последней версии.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[155], line 1
----> 1 shap.plots.bar(shap_values)
File /opt/conda/lib/python3.10/site-packages/shap/plots/_bar.py:83, in bar(shap_values, max_display, order, clustering, clustering_cutoff, show_data, ax, show)
78 else:
79 emsg = (
80 "The shap_values argument must be an Explanation object, Cohorts "
81 "object, or dictionary of Explanation objects!"
82 )
---> 83 raise TypeError(emsg)
85 # unpack our list of Explanation objects we need to plot
86 cohort_labels = list(cohorts.keys())
TypeError: The shap_values argument must be an Explanation object, Cohorts object, or dictionary of Explanation objects!
Подробнее здесь: https://stackoverflow.com/questions/791 ... on-of-shap