PyTorch Geometric - Data Split and Negative Sampling for edges

Hello,

I am currently using PyTorch Geometric for some experiments and wanted to get some clarity on how to use my own train / test splits as well as assign positive and negative labels.

I am creating my own InMemoryDataset from a DataFrame contains columns like IsTrain which is set to 1 / 0 depending on my Train / Test split. It also has a column IsPositive that tracks whether the edge is being supposed to be used as a positive or negative input.

Currently I am just using the utils methods like train_test_split_edges, negative_sampling which ignores my flags as mentioned below.

Any help is much appreciated. Many thanks in advance.

Thanks & regards
Arko

1 Like