TeamHG-Memex / eli5

A library for debugging/inspecting machine learning classifiers and explaining their predictions
http://eli5.readthedocs.io
MIT License
2.74k stars 332 forks source link

explain_prediction_keras support for Keras tokenizer #332

Open teabolt opened 4 years ago

teabolt commented 4 years ago

When explaining scikit-learn estimators we can pass arguments like vec or vectorized to vectorize raw text into arrays.

What if we added the same support for Keras Grad-CAM explanations (https://github.com/TeamHG-Memex/eli5/pull/325)? For example, we can make tokens take in a vectorizer function, or use keras.preprocessing.text.Tokenizer. doc could then just be a raw string document.