liveBook · Manning

Positive example

As explained in Graph Algorithms for Data Science

A positive sample is a node pair labeled as having the relationship being predicted.

A positive example is a pair of nodes labeled as having the relationship that a link-prediction classifier should recognize. Existing relationships provide positive examples for training and testing. section 10.2.3 section 10.2

Positive examples support link-prediction workflows in several ways:

  • Pair with negative examples so the classifier can distinguish relationships that exist from relationships that do not. section 10.2.3
  • Supply relationship cases for training and evaluation while network features are calculated from a separate feature set. section 10.2
  • Help control class imbalance because possible non-relationships can greatly outnumber existing relationships in sparse graphs. section 10.2.3

Counting positive examples

A link-prediction exercise produces 13,082 positive examples. A practical workflow selects approximately the same number of negative examples, then keeps the relationship data organized across feature, training, and test sets. section 10.2.3 section 10.6

How Graph Algorithms for Data Science covers it

How deep it goes
Explains labeling, dataset placement, and class imbalance, but does not detail classifier internals or feature computation.
Examples
Uses existing relationships and a count of 13,082 positive examples to illustrate sample construction.
What it assumes
Assumes node pairs and relationships, while introducing their role in binary classification from the need to distinguish two outputs.
What you can do after
Evaluate link-prediction datasets by identifying positive cases and balancing them with appropriately selected negative samples.
How it connects
Connects positive examples to link prediction, negative samples, dataset splits, graph-based features, and data leakage.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Algorithms for Data Science. The section links point to the parts of the book it draws on.