marcotcr / lime

Lime: Explaining the predictions of any machine learning classifier
BSD 2-Clause "Simplified" License
11.51k stars 1.8k forks source link

LimeTabularExplainer for 3D Input #519

Closed GlorianY closed 3 years ago

GlorianY commented 3 years ago

I am working on a regression problem with LSTM (TensorFlow 2.0). As we all know, the input shape of LSTM is 3D which composed of (#samples #timestep #features).

When I try to use my training data (3D input shape) on the training_data parameter of LimeTabularExplainer, I got an error::

IndexError: boolean index did not match indexed array along dimension 1; dimension is 1 but corresponding boolean dimension is 13

Note that, 13 is the number of features.

My question is, how to use LimeTabularExplainer when the shape of both my training data and test data is 3D?

marcotcr commented 3 years ago

Check this out

GlorianY commented 3 years ago

Thanks! Apologies that I missed it when reading the documentation.