I am trying to reproduce the following example with the latest version 0.46.0 of SHAP open source. However, it seems to be weird that the result is not a bar chat as in the example.
My attempt: Then, I tried to the library to find the summary_plot
but could not find any information. I then tried to use shap.plots.bar
but it resulted in this type of error. I hope you could help me perform the stacked bar plot as in the above link with the latest version.
---------------------------------------------------------------------------
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!
1