Closed Yujun-Yan closed 6 years ago
One more question, in the main evaluation file, it seems that the MNE model already sees the whole network. line 466: MNE_model = train_model(edge_data_by_type) Should we change this?
For your first question, I separate the training data and evaluation data in line 452-456. And then from the evaluation dataset, we excluded the edges that contain unseen nodes (The code you quoted). We did this because we don't want the unseen nodes to influent the whole evaluation process. Actually, only a very small number of eval edges may contain unseen nodes.
For the second question, Thanks for the reminding. I have changed it to training_data_by_type. That's a typo when I was formatting this code. I tested the whole program again and the result is unaffected.
Best Regards, Hongming
Hi, I have a question about the positive and negative edge sampling. In your code, line 488, (I pasted here)
for edge in evaluation_data_by_type[edge_type]: if edge[0] in tmp_training_nodes and edge[1] in tmp_training_nodes: if edge[0] == edge[1]: continue selected_true_edges.append(edge) if len(selected_true_edges) == 0: continue
I don't quite understand how you select the positive edges. Why both nodes appear in the training set is a positive edge?