Closed diamondspark closed 2 years ago
Hi @diamondspark they’re stored as node attributes. You can check out the NetworkX docs for more info: https://networkx.org/documentation/stable/reference/classes/generated/networkx.Graph.nodes.html
In short:
g.nodes(data=True)
# Or iterate over them:
for n, d in g.nodes(data=True):
…
Let me know how you get on :)
Thank you @a-r-j, this works. I further convert this to Pytorch geometric (Pyg) graph. I'm going through your code for GraphFormatConvertor and doesn't look like it captures node attributes in conversion. I think I need to add these features to PyG nodes manually unless I'm missing something.
Thank you once again for your work.
No worries, there’s the columns
Parameter in the GraphFormatConvertor
Object that you can use to save these features.
https://graphein.ai/modules/graphein.ml.html#module-graphein.ml.conversion
Thank you! Works!
@a-r-j I'm trying to get node features for residual level graph. Following is my code
How do I access these features?