Giter Club home page Giter Club logo

deeptime's Introduction

Learning Deep Time-index Models for Time Series Forecasting (ICML 2023)



Figure 1. Overall approach of DeepTime.

Official PyTorch code repository for the DeepTime paper. Check out our blog post!

  • DeepTime is a deep time-index based model trained via a meta-optimization formulation, yielding a strong method for time-series forecasting.
  • Experiments on real world datases in the long sequence time-series forecasting setting demonstrates that DeepTime achieves competitive results with state-of-the-art methods and is highly efficient.

Requirements

Dependencies for this project can be installed by:

pip install -r requirements.txt

Quick Start

Data

To get started, you will need to download the datasets as described in our paper:

  • Pre-processed datasets can be downloaded from the following links, Tsinghua Cloud or Google Drive, as obtained from Autoformer's GitHub repository.
  • Place the downloaded datasets into the storage/datasets/ folder, e.g. storage/datasets/ETT-small/ETTm2.csv.

Reproducing Experiment Results

We provide some scripts to quickly reproduce the results reported in our paper. There are two options, to run the full hyperparameter search, or to directly run the experiments with hyperparameters provided in the configuration files.

Option A: Run the full hyperparameter search.

  1. Run the following command to generate the experiments: make build-all path=experiments/configs/hp_search.
  2. Run the following script to perform training and evaluation: ./run_hp_search.sh (you may need to run chmod u+x run_hp_search.sh first).

Option B: Directly run the experiments with hyperparameters provided in the configuration files.

  1. Run the following command to generate the experiments: make build-all path=experiments/configs/ETTm2.
  2. Run the following script to perform training and evaluation: ./run.sh (you may need to run chmod u+x run.sh first).

Finally, results can be viewed on tensorboard by running tensorboard --logdir storage/experiments/, or in the storage/experiments/experiment_name/metrics.npy file.

Main Results

We conduct extensive experiments on both synthetic and real world datasets, showing that DeepTime has extremely competitive performance, achieving state-of-the-art results on 20 out of 24 settings for the multivariate forecasting benchmark based on MSE.



Detailed Usage

Further details of the code repository can be found here. The codebase is structured to generate experiments from a .gin configuration file based on the build.variables_dict argument.

  1. First, build the experiment from a config file. We provide 2 ways to build an experiment.
    1. Build a single config file:
      make build config=experiments/configs/folder_name/file_name.gin
      
    2. Build a group of config files:
      make build-all path=experiments/configs/folder_name
  2. Next, run the experiment using the following command
    python -m experiments.forecast --config_path=storage/experiments/experiment_name/config.gin run
    Alternatively, the first step generates a command file found in storage/experiments/experiment_name/command, which you can use by the following command,
    make run command=storage/experiments/experiment_name/command
  3. Finally, you can observe the results on tensorboard
    tensorboard --logdir storage/experiments/
    or view the storage/experiments/deeptime/experiment_name/metrics.npy file.

Acknowledgements

The implementation of DeepTime relies on resources from the following codebases and repositories, we thank the original authors for open-sourcing their work.

Citation

Please consider citing if you find this code useful to your research.

@article{woo2022deeptime,
    title={DeepTime: Deep Time-Index Meta-Learning for Non-Stationary Time-Series Forecasting},
    author={Gerald Woo and Chenghao Liu and Doyen Sahoo and Akshat Kumar and Steven C. H. Hoi},
    year={2022},
    url={https://arxiv.org/abs/2207.06046},
}

deeptime's People

Contributors

dependabot[bot] avatar gorold 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.