Random edge sampling #6323
-
Hello, I am trying to create a Link prediction model and have a question about how to sample training edges properly. Essentially, in my problem, each node has an embedding extracted by a natural language model and using it (and only it) I want to predict whether an edge should be present between two nodes. I am not interested in information from connected Neighbours, as I will not use any graph-based convolution. Is there any Dataloader that will allow me to do this? At the moment I am using LinkNeighborLoader in this way: The issue is that the batch.edge_index tensor I get in this way is empty. Note: Am I doing something wrong? Thank you in advance for any :). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No you aren't doing anything wrong. Since you don't want neighborhood information its probably better to use torch.DataLoader. |
Beta Was this translation helpful? Give feedback.
No you aren't doing anything wrong.
edge_index
is used to run message passing, since you specifiednum_neighbors=[0]
the loader simply doesn't sample any edges for message passing.edge_label_index
can be used for the link prediction task.Since you don't want neighborhood information its probably better to use torch.DataLoader.