gae
gae copied to clipboard
about features and val_edges_false
Hi tkipf, thanks for your code! I have two questions about the data:
- In the "input_data.py", why did you adjust the order of the test nodes features in the "features"? Does this operation cause the index of the same node in "graph" to be inconsistent with the index in "features"?
- In the "preprocessing.py", when create the "val_edges_false", why is it created differently than the "test_edges_false"? Does this cause the "val_edges_false" to contain test edges that actually exist in the graph? These two questions have been bothering me for a long time. I am looking forward to your reply. Thank you!
Same question as @zhangxiaozao mentioned in 2: In utils.py - mask_test_function(adj), when create the val_edges_false: while len(val_edges_false) < len(val_edges): idx_i = np.random.randint(0, adj.shape[0]) idx_j = np.random.randint(0, adj.shape[0]) if idx_i == idx_j: continue if ismember([idx_i, idx_j], train_edges): continue if ismember([idx_j, idx_i], train_edges): continue if ismember([idx_i, idx_j], val_edges): continue if ismember([idx_j, idx_i], val_edges): continue if val_edges_false: if ismember([idx_j, idx_i], np.array(val_edges_false)): continue if ismember([idx_i, idx_j], np.array(val_edges_false)): continue val_edges_false.append([idx_i, idx_j])
This seems like failed to guarantee that the val_edges_false doesn't contain some edges from test edges, which will make this assertion failed: assert ~ismember(val_edges_false, edges_all)
Looking forward to your reply, thanks!
您的邮件已收到