Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Start with Graph Convolutional Neural Networks using DGL

A Painless Introduction

4 min readJul 27, 2021

--

I have reviewed some of the existing libraries to do Graph Convolutional Neural Networks (GCNN’s) and, although in general they are very good, I always return to DGL because it has excellent documentation and many examples, among other things [1]. Here, I want to share my review of a classic example in the study of GCNN’s, the CORA dataset using of course DGL. The CORA dataset is citation network where nodes are articles and edges are citations between them. The gif below helps to get an intuition of how are the connections at a glance.

CORA graph visualized with Pyvis. GIF by author.

There are 2708 nodes with 7 classes and each node has associated a feature vector with 1433 features [2]. Here we are going to use this dataset to make a semi-supervised classification task to predict a node class (one of seven) knowing a small number of nodes. In this case the number of known nodes is 140 as is implemented in DGL, but a different number could be used as the whole information is available. Before starting we must have the DGL library installed which currently is V0.7. Then we proceed to import some modules in the usual way,

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

JOSÉ MANUEL NÁPOLES DUARTE
JOSÉ MANUEL NÁPOLES DUARTE

Written by JOSÉ MANUEL NÁPOLES DUARTE

Physics/ML Lecturer at FCQ-UACH. Member of the Streamlit Creators program.

Responses (2)