TeamHG-Memex / eli5

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

Occasional no highlight in show_prediction for images #368

Open abedkhooli opened 4 years ago

abedkhooli commented 4 years ago

I use ktrain wrapper library for Keras which calls eli5.show_prediction(model, x) [eli5: '0.10.1'] and for some images, there is no indication (color highlight) on the predicted image (both correct and incorrect classification). Ex: image

teabolt commented 4 years ago

HI @abedkhooli,

Could you post the result of eli5.explain_prediction(model, x)? This should show if it's a problem with the explanation or with the color highlight.

You can also try changing the color highlight like this: eli5.show_prediction(model, x, alpha_limit=1.0, colormap=matplotlib.cm.cividis)

abedkhooli commented 4 years ago

Ktrain uses a forked version with tf.keras and TF2.x, so these won't work. I tried with one less epoch and got it highlighted correctly! image