Open alimuham1 opened 4 years ago
Hello The problem I urgently need to solve is exactly similar to your goal. I generated the embedding in another way. I need to solve the task of link prediction. Could you please solve it. Any answer will be of great help to me. Thank you
I have solved issues regarding link prediction by changing the following files and the following lines:
for (st, ed, w) in di_graph.edges_iter(data='weight', default=1):
I have changed to for (st, ed, w) in list(di_graph.edges(data='weight', default=1)):
Reason: As far as I have understood, edges_iter was removed after NetworkX 2.0.
filtered_edge_list = [e for e in predicted_edge_list if not train_digraph.has_edge(node_l(e[0]), node_l(e[1]))]
I have changed to filtered_edge_list = [e for e in predicted_edge_list if not train_digraph.has_edge(node_l[e[0]], node_l[e[1]])]
Reason: If node_l is None (line 65), then node_l is defined as a list (line 66). Therefore, as lists being not callable, one must use node_l[...], and not node_l(...). I have not tested link prediction for labeled graphs yet.
Best regards!
I want to use the link prediction code with my own embedding methods. Could you please explain me how i would use this.
I am using cora edgelist as dataset, and i have generated embeddings with the help of deepwalk method and now i want to try the task of link prediction.
Is it possible that i could use your link prediction file to generate the accuracy score. Sorry, may be i am bit confuse to use your code for my link prediction task.
Any help would be a great favor for me.
Thanks