working-yuhao / DEAL

IJCAI2020
MIT License
20 stars 6 forks source link

Data Splits #5

Closed Lemour-sudo closed 3 years ago

Lemour-sudo commented 3 years ago

In the original code, when using the Cora dataset under the inductive setting, I observed that the node indices in the training data ('train_ones' variable in the code) and the node indices of the whole graph ('A' variable in the code) do not align. For example, only 17 edges in the training data (train_ones) exist in the full set of edges (adjacency matrix). But actually all the edges in the training data should exist in the entire adjacency matrix because the training data should be sampled from the entire data. May I ask if there is any mapping implemented in the code to change between node indices in the training data and node indices in the entire graph?

working-yuhao commented 3 years ago

Hi, When you check the train_ones with A_train, you can find that all these edges are in A_train (also in A). For example, you can use: A_train[train_ones[:,0],train_ones[:,1]].min() Hope this helps.

kind regards, Yu