diff --git a/README.md b/README.md index 4a036f6..75f8084 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,8 @@ st_shap(shap.plots.beeswarm(shap_values), height=300) explainer = shap.TreeExplainer(model) shap_values = explainer.shap_values(X) -st_shap(shap.force_plot(explainer.expected_value, shap_values[0,:], X_display.iloc[0,:]), height=200, width=1000) -st_shap(shap.force_plot(explainer.expected_value, shap_values[:1000,:], X_display.iloc[:1000,:]), height=400, width=1000) +st_shap(shap.force_plot(explainer.expected_value, shap_values.values[0,:], X_display.iloc[0,:]), height=200, width=1000) +st_shap(shap.force_plot(explainer.expected_value, shap_values.values[:1000,:], X_display.iloc[:1000,:]), height=400, width=1000) ``` @@ -73,4 +73,4 @@ st_shap(shap.force_plot(explainer.expected_value, shap_values[:1000,:], X_displa #### Notes -Colorbar changes in `matplotlib>3.4.3` introduced bugs ([#22625](https://github.com/matplotlib/matplotlib/issues/22625), [#22087](https://github.com/matplotlib/matplotlib/issues/22087)) that cause the colorbar of certain shap plots (e.g. `beeswarm`) to not display properly. If colorbars are not displayed properly, try downgrading `matplotlib` to `3.4.3`. \ No newline at end of file +Colorbar changes in `matplotlib>3.4.3` introduced bugs ([#22625](https://github.com/matplotlib/matplotlib/issues/22625), [#22087](https://github.com/matplotlib/matplotlib/issues/22087)) that cause the colorbar of certain shap plots (e.g. `beeswarm`) to not display properly. If colorbars are not displayed properly, try downgrading `matplotlib` to `3.4.3`.