-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Some usability updates to Explanation
#6054
Some usability updates to Explanation
#6054
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6054 +/- ##
==========================================
+ Coverage 84.27% 84.29% +0.02%
==========================================
Files 362 362
Lines 20456 20488 +32
==========================================
+ Hits 17239 17271 +32
Misses 3217 3217
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@rusty1s and @dufourc1, while working on this PR, I’ve encountered the following behaviour. If you create a partially empty
then trying to acces either of the other masks results in the following
Is this intended behaviour? |
I guess it is. You can access them via |
I would have expected that to return |
Motivation
When evaluating and visualizing explanations it will be very convenient to obtain the explanation and explanation complement subgraphs directly from the
Explanation
objects. Given that the class holds information of the original graph being explained this shouldn’t be difficult to achieve. I propose we add two methods to theExplanation
class:get_explanation_subgraph
returns the explanation subgraphget_complement_subgraph
returns the complement of the explanation subgraphI’ve submitted this draft PR to get opinions on this, both implementation-wise and if we should do this in the first place.
Alternatives
util.py
for general Data object, e.g. amask_graph
method, which can then be reused here or elsewhere.