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

How to run explainers on Planetoid datasets? #68

Open
smtnkc opened this issue Apr 14, 2023 · 2 comments
Open

How to run explainers on Planetoid datasets? #68

smtnkc opened this issue Apr 14, 2023 · 2 comments

Comments

@smtnkc
Copy link

smtnkc commented Apr 14, 2023

Thanks for your efforts on this work!

I understood the examples you provided for the MUTAG TUDataset. I need to run explainers for Planetoid datasets. More specifically, I want to implement test_SubgraphX_Cora.py, which is very similar to test_SubgraphX_MUTAG.py.

Can you provide a guideline for this purpose?

@owencqueen
Copy link
Collaborator

Hello,

We're glad that you're interested in using our codebase! If you are simply substituting another PyTorch Geometric dataset, it should work in a similar way to the script you cited here in our repo, just replace the following line (line 16 from the test_SubGraphX_MUTAG.py script):
dataset = TUDataset(root='data/TUDataset', name='MUTAG')
with a line to load your dataset. Hopefully that helps, but please provide more details if you need more assistance beyond this, we're happy to help!

Thanks,

GraphXAI team

@smtnkc
Copy link
Author

smtnkc commented Apr 29, 2023

@owencqueen Thanks for your reply.

Unfortunately, just changing the dataset loaded does not work in this case because the structure of the TUDataset and Planetoid is different.

I deep-dived into the codebase, and what I see is that test_SubgraphX_MUTAG.py uses MUTAG.py to create a MUTAG dataset object which is a GraphDataset. However, Planetoid datasets are NodeDatasets (which consist of a single graph rather than multiple).

I have tried to create a CORA.py similar to MUTAG.py and modify the test script accordingly. However, I could not manage it since the test script is very specific to MUTAG (or GraphDataset in general).

So, my question actually is that how can I run the explainers for NodeDatasets?

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

No branches or pull requests

2 participants