Code Monkey home page Code Monkey logo

anm-frets-pyraformer's Introduction

FreTS and Pyraformer

This is an open-source library of the implementation of:

  • FreTS - Frequency-domain MLPs are More Effective Learners in Time Series Forecasting [NeurIPS 2023]
  • Pyraformer - Pyraformer: Low-complexity Pyramidal Attention for Long-range Time Series Modeling and Forecasting [ICLR 2022]

The repo is for the course project of Advanced Network Management (ANM) of Tsinghua University. The code base is mainly modified from Time Series Library (TSlib).

Usage

  1. Install Python 3.8. We recommand using Anaconda to manage your environment. For example, you can create an environment with the following command.

    conda create -n ANM python=3.8

    After creating the environment, execute the following command to activate it.

    conda activate ANM
  2. Execute the following command to install requiements.

    pip install -r requirements.txt

    The requirements are verified with Ubuntu 22.04 and Nvidia RTX 3090 with CUDA 12.2. If you encounter an error like this RuntimeError: CUDA error: no kernel image is available for execution on the device in the folloing steps, you may need to reinstall a compatible version of your environment, see Pytorch.

  3. Prepare Data. Place the downloaded datasets in the folder./dataset. The datasets used in this project are provided by TA.

  4. Train and evaluate model. We provide the experiment scripts for all benchmarks under the folder ./scripts/. You can reproduce the experiment results as the following examples:

    bash ./scripts/FreTS_ETT.sh

    or run all experiments with

    bash ./run.sh

    If you only want to run some tests after training, execute

    bash ./scripts/test-only/Tests.sh	# only contains four configurations to reproduce the figures in the report
  5. Checkpoints are stored in ./checkpoints/*/ in pth format. Test results are stored in ./results/*/ in npy format. Visualization of predictions are stored in ./test_results/*/ in pdf format.

anm-frets-pyraformer's People

Stargazers

Polaris avatar

Watchers

Yunze Wei 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.