liveBook · Manning

Data exploration

As explained in Graph Neural Networks in Action

The process of examining and summarizing data to discover patterns, structure, relationships, and potential anomalies.

Data exploration examines and summarizes node features and graph structure before modeling. It helps reveal topology, relationships, and potential blockers to effective GNN training. section 4.2.2 section 4.2.3

A practical graph exploration workflow includes:

  • Load labels, node features, and an adjacency list from the MATLAB dataset. section 4.2.2
  • Convert the adjacency list into a NetworkX graph and inspect node count, edge count, and average degree. section 4.2.3
  • Analyze connected components, density, clustering coefficients, and degree distributions to understand topology and modeling constraints. section 4.2.3
Listing 4.1 Load data
prefix = 'PATH_TO_MATLAB_FILE/'

data_file = loadmat(prefix +  'YelpChi.mat')   #1

labels = data_file['label'].flatten()          #2
features = data_file['features'].todense().A   #2

yelp_homo = data_file['homo']            #3
sparse_to_adjlist(yelp_homo, prefix +\
 'yelp_homo_adjlists.pickle')

Use the loading listing to reproduce the initial dataset preparation, including MATLAB import, feature extraction, and adjacency-list serialization. section 4.2.2

YelpChi graph profile

Exploration finds 45,954 nodes, 3,892,933 edges, an average degree of 84.71, 26 connected components, sparse density, and an average clustering coefficient of 0.77. The largest component contains nearly the entire graph. section 4.2.3

How Graph Neural Networks in Action covers it

How deep it goes
Moves from loading features and adjacency data to implementing graph metrics, but does not detail downstream model construction.
Examples
Uses the YelpChi dataset, MATLAB loading code, adjacency lists, NetworkX graphs, and tabulated topology measurements.
What it assumes
Assumes access to labels, node features, and an adjacency list, while demonstrating how to load and convert these artifacts.
What you can do after
Apply Python, SciPy, and NetworkX workflows to load graph data and diagnose its structural properties before training.
How it connects
Connects node features, graph structure, connected components, graph metrics, NetworkX, and graph neural network training.

Also explained in

Compare how 13 books explain data exploration →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Neural Networks in Action. The section links point to the parts of the book it draws on.