marcotcr / lime

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

LIME for RNN - padding (dummy) records #630

Closed OmarMHamed closed 3 years ago

OmarMHamed commented 3 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 3 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.