-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error during plot_features_importances #10
Comments
This is the result of pip freeze, I am using Python 3.10.12 altair==4.2.2 |
Hello,I have got this error when trying to run the plot_features_importance in the tabular_explanations_example.ipynb example
`ValueError Traceback (most recent call last)
Cell In[9], line 1
----> 1 exp.plot_features_importance()
File ~/xaihac/XAI-Lib/src/xailib/explainers/shap_explainer_tab.py:42, in ShapXAITabularExplanation.plot_features_importance(self, fontDimension)
38 else:
39 feature_values = self.exp[0]
---> 42 arr=np.c_[np.array(self.feature_names), feature_values]
43 dataToPlot=pd.DataFrame(arr,columns=['name','value'])
44 dataToPlot['value'] = dataToPlot['value'].astype('float64')
File ~/.venv/lib/python3.10/site-packages/numpy/lib/index_tricks.py:418, in AxisConcatenator.getitem(self, key)
414 # concatenate could do cast, but that can be overriden:
415 objs = [array(obj, copy=False, subok=True,
416 ndmin=ndmin, dtype=final_dtype) for obj in objs]
--> 418 res = self.concatenate(tuple(objs), axis=axis)
420 if matrix:
421 oldndim = res.ndim
ValueError: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 61 and the array at index 1 has size 2`
What could cause this error? looks like an indexing issue of the couple relative to the explanations for the two classes...
The text was updated successfully, but these errors were encountered: