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

Causal and asymmetric Shapley values implementation #273

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9220773
Add code for computing asymmetric (Frye et al.) and causal (Heskes et…
igbucur Aug 21, 2021
53da84b
Bugfix variable name in explain.causal
igbucur Aug 21, 2021
90ee920
Add references to explain.causal
igbucur Aug 21, 2021
cc8616b
Update NAMESPACE and documentation for asymmetric and causal Shapley …
igbucur Aug 21, 2021
2707b6e
Bugfix in explain.causal, explainer_x_test removed in shapr master
igbucur Aug 21, 2021
17de7e9
Bugfix in prepare_data.causal where check for NULL value failed.
igbucur Aug 21, 2021
a13ec74
Bugfix moved all checks for the default value of causal_ordering to s…
igbucur Aug 22, 2021
fe0b08a
Merge branch 'master' of https://github.com/NorskRegnesentral/shapr i…
igbucur Aug 25, 2021
cb40de1
Add basic tests for sample_causal and minor fix for the fully conditi…
igbucur Aug 25, 2021
c2e1d67
Replace default causal_ordering value in feature_exact and feature_co…
igbucur Aug 25, 2021
7ea3b1d
Add extra warnings for cases that are not yet implemented.
igbucur Aug 25, 2021
429bfee
Add basic tests to cover the asymmetric case in features functions
igbucur Aug 25, 2021
d7f7de3
Update known values for test objects after adding asymmetric and caus…
igbucur Aug 25, 2021
8597e86
Update docs feature_combinations
igbucur Aug 26, 2021
8e1588c
minor fix in docs, line too long
igbucur Aug 26, 2021
317bb3c
Merge branch 'master' of https://github.com/NorskRegnesentral/shapr i…
igbucur Oct 5, 2021
dc6fbc4
Updated new test objects with asymmetric and causal_ordering components
igbucur Oct 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Bugfix variable name in explain.causal
igbucur committed Aug 21, 2021

Verified

This commit was signed with the committer’s verified signature.
apoelstra Andrew Poelstra
commit 53da84bd095ca1802e2dbea7a4c3f712d7e0b201
8 changes: 4 additions & 4 deletions R/explanation.R
Original file line number Diff line number Diff line change
@@ -275,8 +275,8 @@ explain.gaussian <- function(x, explainer, approach, prediction_zero, n_samples
}

# If no causal ordering is specified, put all variables in a single component.
if (is.null(x$causal_ordering)) {
causal_ordering <- list(1:ncol(x$x_test))
if (is.null(explainer$causal_ordering)) {
causal_ordering <- list(1:ncol(explainer$x_test))
}

# Generate data
@@ -329,8 +329,8 @@ explain.causal <- function(x, explainer, approach, prediction_zero, n_samples =
}

# If no causal ordering is specified, put all variables in a single component.
if (is.null(x$causal_ordering)) {
causal_ordering <- list(1:ncol(x$x_test))
if (is.null(explainer$causal_ordering)) {
causal_ordering <- list(1:ncol(explainer$x_test))
}

explainer$confounding <- confounding