I'm using the following notebook below in an attempt to recreate the bar graph with feature clustering.
When I execute clustering = shap.utils.hclust(X, y), I receive the following error:
module 'shap' has no attribute 'utils'
https://github.com/slundberg/shap/blob/master/notebooks/plots/bar.ipynb
I had the same problem. Here's how I fixed it
pip uninstall shap==0.35git clone https://github.com/slundberg/shap.gitpython setup.py install cp -r ./ /[destination_directory]Same issue here. Followed @kamalsky recommendations but python setup.py install gives error: package init file 'shap/__init__.py' not found (or not a regular file) & error: package directory 'shap/explainers' does not exist.
Most helpful comment
I had the same problem. Here's how I fixed it
pip uninstall shap==0.35git clone https://github.com/slundberg/shap.gitpython setup.py installcp -r ./ /[destination_directory]