GithubHelp home page GithubHelp logo

spectranet's Introduction

SpectraNet: multivariate forecasting and imputation under distribution shifts and missing data

Contents

  1. Overview of Methodology
  2. Installation
  3. Organization
  4. How to run

Overview

In this work we tackle two widespread challenges in real applications that have been largely understudied: distribution shifts and missing data. We propose SpectraNet, a novel multivariate time-series forecasting model that dynamically infers a latent space spectral decomposition to capture current temporal dynamics and correlations. A Convolution Neural Network maps the learnt representation by sequentially mixing its components and refining the output. Our proposed approach can simultaneously forecast and interpolate past observations. SpectraNet achieves SoTA performance on synthetic data and five benchmark datasets with up to 92% less parameters and comparable training times with baselines. On settings with up to 80% missing data, SpectraNet has average performance improvements of almost 50% over the second best alternative.

Installation

We recommend installing Ananconda to run our code. To install Anaconda, review the installation instructions here.

To setup the environment using conda, run the following commands:

    # To create environment from environment.yml file
    foo@bar:~$ conda env create -f environment.yml
    
    # To activate the environment
    foo@bar:~$ conda activate spectranet 
    
    # To verify if the new environment was installed correctly
    foo@bar:~$ conda env list 

Organization

  • run_spectranet.py: Runs SpectraNet results of the paper on a predefined benchmark dataset, one of [ILI, Exchange, ETTm2, Weather, solar]. The script will select optimal hyperparameters on the validation set, and produce forecasts for the test set.
  • src/models/spectranet.py: SpectraNet model.
  • src/data/ts_dataset.py: Custom Time-series Dataset class.
  • src/hyperpar_selection.py: Contains auxiliary functions and the hyperpar_selection method to run the full pipeline.

Datasets should be placed in the data folder, following ILI example included in this repo.


How to run

Run the following line to produce forecasts for each benchmark dataset. hyperopt_max_evals controls the number of steps of the HYPEROPT algorithm for hyperparameter selection, occlusion_size controls the size of the segments to occlude. The script will repeat the pipeline for different occlusion probabilities: 0, 20%, 40%, 60%, and 80%.

python run_spectranet.py --dataset 'ILI' --hyperopt_max_evals 15 --occlusion_size 10 --experiment_id "NAME"

Results will be stored in the results folder.

spectranet's People

Contributors

cchallu avatar

Stargazers

David Hockaday 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.