I am training a link prediction model using the tutorial in the docs based on the
EdgeDataLoader which is working well. As in the tutorial, the model is trained with a negative sampler.
However, now I want to apply the model to find new connections between specific nodes. This means passing pairs of nodes (u,v) \notin E to the model which are not connected in the original graph. As far as I can tell, the
EdgeDataLoader can’t handle this since it selects from existing edges (or edges in a negative graph).
Does it make sense to instead use a loader which iterates on pairs of nodes or is there something I am missing?
I suppose I could build a negative graph containing (u,v) for score computation, and select edges incident to u and v to send to the
EdgeDataLoader to do the message passing. However, this seems sloppy.
Thanks for the help!