Skip to content
Discussion options

You must be logged in to vote

Thanks for your interest. You are absolutely right. In general, we expect the user to handle the mapping from "semantic nodes" to node indices and vice versa. Since the user creates the data, this mapping should be known to him/her.

In order to achieve this, one may hold a dictionary which maps semantics to node indices:

mapping = { 'node1': 0, 'node2': 1, 'node3': 2, ... }

which can be used to query a model (in this case for node classification):

out = model(x, edge_index)
# Get the prediction for 'node2':
out[mapping['node2']]

I have no problem with integrating an example to the library to show-case this.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ozlander
Comment options

@rusty1s
Comment options

@ozlander
Comment options

@rusty1s
Comment options

Answer selected by ozlander
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants