Traceback (most recent call last):
File "link_prediction.py", line 548, in
test_edge_functions(args)
File "link_prediction.py", line 343, in test_edge_functions
Gtrain.train_embeddings(p, q, dimensions, num_walks, walk_length, window_size)
File "link_prediction.py", line 228, in train_embeddings
self.preprocess_transition_probs()
File "C:\Users\zhouli\Desktop\论文研究开展资料\experiment\node2vec_linkprediction\node2vec.py", line 85, in preprocess_transition_probs
unnormalized_probs = [G[node][nbr]['weight'] for nbr in sorted(G.neighbors(node))]
KeyError: 'weight
Traceback (most recent call last): File "link_prediction.py", line 548, in
test_edge_functions(args)
File "link_prediction.py", line 343, in test_edge_functions
Gtrain.train_embeddings(p, q, dimensions, num_walks, walk_length, window_size)
File "link_prediction.py", line 228, in train_embeddings
self.preprocess_transition_probs()
File "C:\Users\zhouli\Desktop\论文研究开展资料\experiment\node2vec_linkprediction\node2vec.py", line 85, in preprocess_transition_probs
unnormalized_probs = [G[node][nbr]['weight'] for nbr in sorted(G.neighbors(node))]
KeyError: 'weight