lime icon indicating copy to clipboard operation
lime copied to clipboard

Add predict_fn_accept_dense_only to explain_instance when input is sparse but model takes dense

Open BinDong314 opened this issue 3 years ago • 1 comments

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)

Bin [email protected]

BinDong314 avatar Nov 11 '22 18:11 BinDong314

@marcotcr since this only involves a few lines of code change. Would you mind help to review and merge it? Thanks

BinDong314 avatar Nov 30 '22 17:11 BinDong314