Node classification¶
StellarGraph provides numerous algorithms for doing node classification on graphs. This folder contains demos of all of them to explain how they work and how to use them as part of a TensorFlow Keras data science workflow.
A node classification task predicts an attribute of each node in a graph. For instance, labelling each node with a categorical class (binary classification or multiclass classification), or predicting a continuous number (regression). It is supervised or semi-supervised, where the model is trained using a subset of nodes that have ground-truth labels.
Node classification can also be done as a downstream task from node representation learning/embeddings, by training a supervised or semi-supervised classifier against the embedding vectors. Unsupervised algorithms that can be used in this manner include random walk-based methods like Metapath2Vec. StellarGraph provides demos of unsupervised algorithms, some of which include a node classification downstream task.
Find algorithms and demos for a graph¶
This table lists all node classification demos, including the algorithms trained, the types of graph used, and the tasks demonstrated.
Demo |
Algorithm(s) |
Node features |
Heterogeneous |
Directed |
Edge weights |
Inductive |
Node embeddings |
---|---|---|---|---|---|---|---|
GCN |
yes |
yes |
|||||
Cluster-GCN |
yes |
yes |
|||||
RGCN |
yes |
yes, multiple edge types |
yes |
||||
GAT |
yes |
yes |
|||||
SGC |
yes |
yes |
|||||
PPNP, APPNP |
yes |
||||||
Attri2Vec |
yes |
yes |
|||||
GraphSAGE |
yes |
yes |
|||||
GraphSAGE |
yes |
yes |
yes |
||||
GraphSAGE |
yes |
yes |
yes |
||||
Node2Vec |
yes |
||||||
Node2Vec |
yes |
||||||
Node2Vec |
yes |
yes |
|||||
GCN, DeepGraphInfomax, semi-supervised training |
yes |
yes |
See the root README or each algorithm’s documentation for the relevant citation(s). See the demo index for more tasks, and a summary of each algorithm.
Table of contents¶
- Node classification via node representations with attri2vec
- Node classification with Cluster-GCN
- Node classification with directed GraphSAGE
- Node classification with Graph ATtention Network (GAT)
- Semi-supervised node classification via GCN, Deep Graph Infomax and fine-tuning
- Node classification with Graph Convolutional Network (GCN)
- Inductive node classification and representation learning using GraphSAGE
- Node classification with GraphSAGE
- Node classification with Node2Vec using Stellargraph components
- Node classification with Node2Vec
- Node classification with weighted Node2Vec
- Node classification with Personalised Propagation of Neural Predictions (PPNP) and Approximate PPNP (APPNP)
- Node classification with Relational Graph Convolutional Network (RGCN)
- Node classification with Simplified Graph Convolutions (SGC)