Replies: 1 comment
-
You can use a transformation which hides nodes via def hide_random_nodes(data):
idx = torch.randperm(data.num_nodes)[:10] # Use 10 random nodes
data.x = data.x[idx]
data.edge_index, data.edge_attr = subgraph(data.edge_index, data.edge_attr, relabel_nodes=True)
return data
TUDataset(root, name='MUTAG', transform=hide_random_nodes) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have about 20 graphs, with 16-4 test-train split. What I want to do is within each graph hide a few nodes and then perform classification. Is there a way to do this?
Beta Was this translation helpful? Give feedback.
All reactions