Closed mminici closed 6 months ago
Another thing which is not clear is that the sum of training, validation and test edges is not equal to the amount of edges prior the training/validation/test split:
for split_id in signed_datasets:
num_split_edges = signed_datasets[0]['train']['label'].shape[0]
num_split_edges += signed_datasets[0]['val']['label'].shape[0]
num_split_edges += signed_datasets[0]['test']['label'].shape[0]
print(data.edge_weight.shape[0] == num_split_edges)
Hello @mminici, thank you for your comments. The first issue is now fixed with my newest pull request. For the second concern, this is expected as we would remove those edges that do not belong to any of the classes of interest for training, testing, or validation. Hope the above helps!
Hello @SherylHYX, it is my pleasure to contribute to your great open-source project. I don't understand your answer. The split strategy is "sign", so the classes of interest are {positive, negative} why should I remove edges?
For link sign prediction specifically, I get "True" as the output of your code snippet. Could you upgrade the installation to our latest version to see if there is still an issue here @mminici ? Thank you!
With the 0.23.0
version of the library, I can say my issue is resolved.
Describe the bug When creating a training-validation-test split for a dataset, some edges in the validation/test have nodes that do not appear in the training.
To Reproduce
Expected behavior We expect all nodes in the validation and test set (i.e., nodes being either source OR target of an edge) to appear at least once in the training edges since maintain_connect parameter is True.
Additional context Since we need to compute a feature vector for each node, we need all nodes in the validation/test to appear at least once in the training otherwise it is not possible to compute a feature vector for them.