eli5 icon indicating copy to clipboard operation
eli5 copied to clipboard

explain_prediction_keras support more types for doc

Open teabolt opened this issue 5 years ago • 0 comments

The explain_prediction_keras function (https://github.com/TeamHG-Memex/eli5/pull/325) takes a doc argument that is the input to a Keras model. Currently doc must be a numpy array.

It would be nice to support other types for doc, not just numpy arrays. See https://github.com/keras-team/keras/blob/ed07472bc5fc985982db355135d37059a1f887a9/keras/engine/training.py#L1315 or https://keras.io/models/sequential/#predict for a list of what types input Keras models can accept.

In particular for text it would be nice to support input in a Python list (for example keras.preprocessing.sequence.pad_sequences can return lists).

teabolt avatar Aug 17 '19 18:08 teabolt