grail icon indicating copy to clipboard operation
grail copied to clipboard

Node attributes

Open LIANGKE23 opened this issue 4 years ago • 3 comments

Is there any way to add attributes inside of your model?

LIANGKE23 avatar Nov 02 '20 15:11 LIANGKE23

Yes, currently the default is a binary flag to use node embeddings as node features but you can easily modify it to use external attributes. You can pass in your node attributes using the n_feats flag of the _prepare_features_new function. Let me know if you have any more questions

egdenis avatar Nov 20 '20 13:11 egdenis

And for the node features, for example, in my graph, there are 6 attributes for the nodes, what is the format of the attribues file I should build? A mat? or npy? with the rows for attributes? or? Can you give an example?

LIANGKE23 avatar Nov 22 '20 00:11 LIANGKE23

Yes, currently the default is a binary flag to use node embeddings as node features but you can easily modify it to use external attributes. You can pass in your node attributes using the n_feats flag of the _prepare_features_new function. Let me know if you have any more questions

And for the node features, for example, in my graph, there are 6 attributes for the nodes, what is the format of the attribues file I should build? A mat? or npy? with the rows for attributes? or? Can you give an example?

LIANGKE23 avatar Dec 02 '20 23:12 LIANGKE23