palash1992 / GEM

BSD 3-Clause "New" or "Revised" License
1.28k stars 362 forks source link

get_edge_weight() for SDNE is out of bound #77

Open JoyXu123 opened 5 years ago

JoyXu123 commented 5 years ago

Hello, I am running the SDNE to get the node embeddings of two nodes. And then I call the embedding.get_edge_weight(node1, node2) to get the edge weights for the edge between the two nodes. However, it gives me an index out of bound error. Is there a fix for this error? Thank you very much! to_attach

palash1992 commented 5 years ago

Are you running it on your own data set? Is the graph connected? Ideally S_hat should be nXn where n is the number of nodes with the caveat that the input should be connected. Let me know if any of these is not the case.

JoyXu123 commented 5 years ago

Hi Palash! Thank you very much for your reply. I ran it on my own dataset, but it gave me this error. So I tried it on karate.edgelist as well. It gives me the same error. Also it seems that S_hat is not of size n*n, it seems more like a one-dimensional array.