marcotcr / lime

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

LimeTextExplainer: Why are the samples created by removing words only? #648

Open JoaoLages opened 2 years ago

JoaoLages commented 2 years ago

Hello everyone! first of all, congratulations for this great package! 💪

I'm writing this issue to ask why LIME builds text perturbations by removing random words from the input question and without changing the order.

Couldn't/Shouldn't one remove words but also replace words with random ones? I know that the idea is this being a black-box algorithm, but does it make sense to integrate that option into the package code?

Cheers!