Hi, I am using CNN for flood susceptibility mapping and would like to find the feature contribution using Shap, I used the test data set to calculate shap_values but I am getting the following error:

"ValueError: shape mismatch: objects cannot be broadcast to a single shape"

and here is my code. e = shap.DeepExplainer(model, X_test) shap_values = e.shap_values(X_test) shap.summary_plot(shap_values[0], X_test, plot_type="bar")

X_test is an array with dimensions (787, 23, 23, 11) and shap_values [0] is also an array with the same dimensions 787 image, image size is 23 X 23 and has 11 bands.

I would be grateful if someone can help.

More Omar Seleem's questions See All
Similar questions and discussions