Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BinDong314
Copy link

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 dbin@lbl.gov

Add predict_fn_accept_dense_only to explain_instance.
When data_row 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 dbin@lbl.gov
@BinDong314
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant