Giter VIP home page Giter VIP logo

ignnk's Introduction

Inductive Graph Neural Networks for Spatiotemporal Kriging (IGNNK)

This is the code corresponding to the experiments conducted for the AAAI 2021 paper "Inductive Graph Neural Networks for Spatiotemporal Kriging" (Yuankai Wu, Dingyi Zhuang, Aurélie Labbe and Lijun Sun).

Motivations

In many applications, placing sensors with fully spatial coverage may be impractical. Installation and maintenance costs of devices can also limit the number of sensors deployed in a network. A better kriging model can achieve higher estimation accuracy/reliability with less number of sensors, thus reducing the operation and maintenance cost of a sensor network. The kriging results can produce a fine-grained and high-resolution realization of spatiotemporal data, which can be used to enhance real-world applications such as travel time estimation and disaster evaluation.

A limitation with traditional methods is that they are essentially transductive, for new sensors/nodes introduced to the network, we cannot directly apply a previously trained model; instead, we have to retrain the full model even with only minor changes. Conversely, we develop an Inductive Graph Neural Network Kriging (IGNNK) model in this work.

Tasks

The goal of spatiotemporal kriging is to perform signal interpolation for unsampled locations given the observed signals from sampled locations during the same period. We first randomly select a subset of nodes from all available sensors and create a corresponding subgraph. We mask some of them as missing and train the GNN to reconstruct the full signals of all nodes (including both the observed and the masked nodes) on the subgraph.

Datasets

The datasets manipulated in this code can be downloaded on the following locations:

Dependencies

  • numpy
  • pytorch
  • matplotlib
  • pandas
  • scipy
  • scikit-learn
  • geopandas

Files

  • utils.py file: preprocess datasets;
  • basic_structure.py file: pytorch implementation of basic graph neural network structure
  • IGNNK_D_METR_LA.ipynb file: a training example on METR_LA dataset
  • IGNNK_U_Central_missing.ipynb file: present the kriging of central US precipitation (USHCN weather condition)

Basic GNNs implementation (basic_structure.py)

Graph convolutional networks - K_GCN in basic_structure.py

Chebynet - C_GCN

Diffusion convolutional networks - D_GCN

Our IGNNK structure is based on the diffusion convolutional networks, one can always builds his own structure using those basic building blocks. We will continue implementing more GNN structures that are suitable for kriging tasks.

Graph attention networks - GAT

Training on the METR_LA datasets

You can simply train IGNNK on METR-LA from command line by

python IGNNK_train.py "metr" --n_o 150 --h 24 --n_m 50 --n_u 50 --max_iter 750

for other datasets:

NREL

python IGNNK_train.py "nrel" --n_o 100 --h 24 --n_m 30 --n_u 30 --max_iter 750

USHCN

python IGNNK_train.py "ushcn" --n_o 900 --h 6 --n_m 300 --n_u 300 --max_iter 750 --z 350

SeData

python IGNNK_train.py "sedata" --n_o 240 --h 24 --n_m 80 --n_u 80 --max_iter 750

ignnk's People

Contributors

kaimaoge avatar lijunsun avatar mengyinglei avatar zhuangdingyi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.