Open wanglu2014 opened 1 year ago
Hi, you can extract the edge list and the number of vertices from G of networkx. Then, you can construct a DHG's Graph with the default construction function https://deephypergraph.readthedocs.io/en/0.9.3/api/dhg.html#dhg.Graph . We will add the transform function of structures from igraph and networkx libraries in the next version. ^^
Thank you for your timely reply. Could you kindly suggest how to set node attribute?
If you don't have the node attribute, you can try the following ways:
Thanks. If I want to set a numeric vector (degree) as node attribute. How to assign the numbers to nodes?
You can try to transform the degree to a one-hot vector. Refer to this https://github.com/weihua916/powerful-gnns/blob/master/util.py#L118
Hi @yifanfeng97 I wonder what encoding of Hypergraphs you would use in NetworkX transformations. I'm implementing such encoding and was hoping to use this one:
What do you think? Thanks!
How to transform a igraph or networkx object into hypergraph object used in DHG?