-
Thank you for making the fantastic Pytorch Geometric! It's already helped me answer real questions. A key difficulty when coming from far less technical fields is the need to explore individual cases (e.g., the social sciences). For example, I'm exploring examples/tgn.py and trying to export the links predicted by the model (y_pred) to an interpretable format. Is there an efficient way to do this? I.e., translate edge_index back to the original input labels for nodes and edges and save the constructed y_pred and y_true graphs into say a NetworkX understandable format. I realise this is not a task that is necessarily of interest to the usual highly technical field utilising PG, but I do believe a simple example of how to do this particular task will help to bridge applications of the models into non-technical fields that are interested in using the technology in qualitative ways. Thank you very much for your time and any assistance you can provide in achieving this goal. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
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):
I have no problem with integrating an example to the library to show-case this. |
Beta Was this translation helpful? Give feedback.
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:
which can be used to query a model (in this case for node classification):
I have no problem with integrating an example to the library to show-case this.