marcotcr / lime

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

LIME for RNN - padding (dummy) records #630

Closed OmarMHamed closed 2 years ago

OmarMHamed commented 2 years ago

Hello Marcotr, I am working on a time-series problem with variable sequence length, Is there a way to inform LIME about the padding (dummy) timesteps so it can ignore them when generating the explanation?

marcotcr commented 2 years ago

You can try writing a wrapper that does the ignoring for you, i.e. you can hide whatever you don't want LIME to perturb and add it back in the prediction function.