Vectorization, also called featurization, transforms graph elements—nodes, relationships, or whole graphs—into numerical vectors that machine-learning algorithms can process. The representation affects downstream tasks such as node classification, link prediction, and graph analysis. Manual features favor interpretability but require more labor; automated features improve efficiency while making the resulting signals harder to interpret. section 10.0
A reliable graph-ML pipeline treats vectorization as a consistent, testable stage:
- Represent each graph element with numerical features, such as a node's total degree or counts of neighbors belonging to selected groups. section 9.3.1
- Choose between interpretable manual features and richer automated embeddings such as Node2Vec, balancing feature meaning against extraction effort. section 9.3.1 section 10.0
- Attach vectors to labels, split the data, scale training vectors, and fit a classifier such as logistic regression. section 9.3.1
- Apply the identical featurization and scaling procedure during prediction; otherwise, the trained model cannot operate correctly. section 9.3.1
- Validate predictions with precision, recall, F-score, and a confusion matrix rather than treating generated classifications as self-validating. section 9.3.1
Karate-club node classification
A 34-member karate-club network supplies a compact test case. Nodes receive labels based on whether members joined the instructor's or administrator's faction. A one-dimensional degree vector performs poorly, while Node2Vec improves the reported F-score. A three-value vector—total degree, neighbors affiliated with Mr. Hi, and neighbors affiliated with an Officer—raises the reported F-score to approximately 0.927. section 9.3.1
Figure 9.7 Training flow for node classification and link prediction. A critical step is the featurization of nodes and relationships. When this process is finished, the vectors can be passed to a classic algorithm. Both node classification and link prediction can be seen as classification tasks.
Use the training-flow diagram to trace vector creation before classification and connect it to the separate prediction flow, where the same transformation is required. section 9.3.1

















