Expand description
Negative edge sampling for link prediction training (ALGO-TR-007).
Generates random vertex pairs that do NOT have an edge in the graph, used as negative examples for training link prediction models (e.g., knowledge graph embeddings, GNN-based link predictors).
Functionsยง
- sample_
negative_ edges - Sample non-edges (negative examples) uniformly at random.
- sample_
negative_ edges_ degree_ biased - Sample negative edges proportional to vertex degree (popularity-biased).
- sample_
negative_ edges_ excluding - Sample negative edges avoiding a set of positive edges.