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

Include paired combination sampling #367

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

LHBO
Copy link
Collaborator

@LHBO LHBO commented Dec 4, 2023

In this pull request, we add support for including paired combination sampling as an option when using a sampled subset of combinations to compute the Shapley value explanations. The user can specify whether he/she wants to use unique (default before, and still default), unique-paired (new), or non-unique (default in very old version of shapr).

Paired sampling has been shown to improve the precision of the approximated Shapley value explanations in several papers., see e.g., (https://arxiv.org/abs/2107.07436).

In my own simulation studies, I found it beneficial to use paired sampling when the features were correlated, but I saw no improvement for independent features.

@@ -94,6 +94,7 @@ explain_forecast <- function(model,
approach,
prediction_zero,
n_combinations = NULL,
combination_sampling_method = "unique",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be NULL

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.

None yet

1 participant