A negative sample is a labeled prediction instance representing a pair of nodes without the relationship being predicted. Binary link-prediction models need both positive and negative samples to distinguish existing from absent links. section 10.2.3 section 10.2
Construct negative samples carefully:
- Select node pairs with no relationship in the feature, training, or test sets. section 10.2.3
- Subsample them because possible nonrelationships grow quadratically, creating severe class imbalance. section 10.2.3 section 10.6
- Use roughly as many negative samples as positive samples so majority-class accuracy does not conceal poor minority-class predictions. section 10.2.3
- Keep feature, training, and test relationships separated when graph-based features could reveal the target link. section 10.2 section 10.6
Balanced link-prediction samples
If an exercise produces 13,082 positive examples, select approximately the same number of unconnected node pairs as negative examples, ensuring those pairs remain relationship-free across the feature, training, and test sets. section 10.2.3
