Code Monkey home page Code Monkey logo

grin's Introduction

Filling the G_ap_s: Multivariate Time Series Imputation by Graph Neural Networks (ICLR 2022 - open review - pdf)

ICLR PDF arXiv

This repository contains the code for the reproducibility of the experiments presented in the paper "Filling the G_ap_s: Multivariate Time Series Imputation by Graph Neural Networks" (ICLR 2022). In this paper, we propose a graph neural network architecture for multivariate time series imputation and achieve state-of-the-art results on several benchmarks.

Authors: Andrea Cini, Ivan Marisca, Cesare Alippi


GRIN in a nutshell

The paper introduces GRIN, a method and an architecture to exploit relational inductive biases to reconstruct missing values in multivariate time series coming from sensor networks. GRIN features a bidirectional recurrent GNN which learns spatio-temporal node-level representations tailored to reconstruct observations at neighboring nodes.

Logo


Directory structure

The directory is structured as follows:

.
├── config
│   ├── bimpgru
│   ├── brits
│   ├── grin
│   ├── mpgru
│   ├── rgain
│   └── var
├── datasets
│   ├── air_quality
│   ├── metr_la
│   ├── pems_bay
│   └── synthetic
├── lib
│   ├── __init__.py
│   ├── data
│   ├── datasets
│   ├── fillers
│   ├── nn
│   └── utils
├── requirements.txt
└── scripts
    ├── run_baselines.py
    ├── run_imputation.py
    └── run_synthetic.py

Note that, given the size of the files, the datasets are not readily available in the folder. See the next section for the downloading instructions.

Datasets

All the datasets used in the experiment, except CER-E, are open and can be downloaded from this link. The CER-E dataset can be obtained free of charge for research purposes following the instructions at this link. We recommend storing the downloaded datasets in a folder named datasets inside this directory.

Configuration files

The config directory stores all the configuration files used to run the experiment. They are divided into folders, according to the model.

Library

The support code, including the models and the datasets readers, are packed in a python library named lib. Should you have to change the paths to the datasets location, you have to edit the __init__.py file of the library.

Scripts

The scripts used for the experiment in the paper are in the scripts folder.

  • run_baselines.py is used to compute the metrics for the MEAN, KNN, MF and MICE imputation methods. An example of usage is

     python ./scripts/run_baselines.py --datasets air36 air --imputers mean knn --k 10 --in-sample True --n-runs 5
    
  • run_imputation.py is used to compute the metrics for the deep imputation methods. An example of usage is

     python ./scripts/run_baselines.py --config config/grin/air36.yaml --in-sample False
    
  • run_synthetic.py is used for the experiments on the synthetic datasets. An example of usage is

     python ./scripts/run_synthetic.py --config config/grin/synthetic.yaml --static-adj False
    

Requirements

We run all the experiments in python 3.8, see requirements.txt for the list of pip dependencies.

Bibtex reference

If you find this code useful please consider to cite our paper:

@inproceedings{cini2022filling,
    title={Filling the G\_ap\_s: Multivariate Time Series Imputation by Graph Neural Networks},
    author={Andrea Cini and Ivan Marisca and Cesare Alippi},
    booktitle={International Conference on Learning Representations},
    year={2022},
    url={https://openreview.net/forum?id=kOu3-S3wJ7}
}

grin's People

Contributors

marshka avatar andreacini 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.