lime
lime copied to clipboard
Add predict_fn_accept_dense_only to explain_instance when input is sparse but model takes dense
Add predict_fn_accept_dense_only to explain_instance.
When data_row (of explain_instance) is scipy.sparse.matrix but the model was NOT trained with scipy.sparse.matrix, the predict_fn_accept_dense_only convert inverse to dense before call predict_fn (and then back to sparse after call predict_fn)
@marcotcr since this only involves a few lines of code change. Would you mind help to review and merge it? Thanks