Closed Abbas2021 closed 3 years ago
Hi,
I'm trying to use LIME for 1D CNN model. However because I have changed the training and testing data shape to 3d to suits the CNN model.
explainer3 = lime_tabular.LimeTabularExplainer(X_train, feature_names=features_names, discretize_continuous=True, class_names=['P','H'] ) print(X_train.shape) (291, 57, 1)
print(features_names.shape) (57,)
I'm getting the following error: IndexError: boolean index did not match indexed array along dimension 1; dimension is 57 but corresponding boolean dimension is 1.
Could you kindly advice me what to do?
LimeTabular takes in a 1d array. If you want to use images, consider LimeImage
Hi,
I'm trying to use LIME for 1D CNN model. However because I have changed the training and testing data shape to 3d to suits the CNN model.
explainer3 = lime_tabular.LimeTabularExplainer(X_train, feature_names=features_names, discretize_continuous=True, class_names=['P','H'] ) print(X_train.shape) (291, 57, 1)
print(features_names.shape) (57,)
I'm getting the following error: IndexError: boolean index did not match indexed array along dimension 1; dimension is 57 but corresponding boolean dimension is 1.
Could you kindly advice me what to do?