Giter Site home page Giter Site logo

weiliango / segrnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lss-1138/segrnn

0.0 1.0 0.0 338 KB

The official repository of the SegRNN paper: "Segment Recurrent Neural Network for Long-Term Time Series Forecasting."

License: Apache License 2.0

Shell 11.07% Python 88.93%

segrnn's Introduction

SegRNN

Welcome to the official repository of the SegRNN paper: "Segment Recurrent Neural Network for Long-Term Time Series Forecasting."

SegRNN is an innovative RNN-based model designed for Long-term Time Series Forecasting (LTSF). It incorporates two fundamental strategies:

  1. The replacement of point-wise iterations with segment-wise iterations
  2. The substitution of Recurrent Multi-step Forecasting (RMF) with Parallel Multi-step Forecasting (PMF)

By combining these two strategies, SegRNN achieves state-of-the-art results with just a single layer of GRU, making it extremely lightweight and efficient.

image

Lots of readers have inquired about why there is a significant difference between the MSE and MAE metrics for Traffic data in the paper. This is because the presence of outlier extreme values in the Traffic data amplifies the MSE error. After adopting the mainstream ReVIN strategy, this issue was resolved, and the forecast accuracy was further improved.

Getting Started

Environment Requirements

To get started, ensure you have Conda installed on your system and follow these steps to set up the environment:

conda create -n SegRNN python=3.8
conda activate SegRNN
pip install -r requirements.txt

Data Preparation

All the datasets needed for SegRNN can be obtained from the Google Drive provided in Autoformer. Create a separate folder named ./dataset and place all the CSV files in this directory. Note: Place the CSV files directly into this directory, such as "./dataset/ETTh1.csv"

Training Example

You can easily reproduce the results from the paper by running the provided script command. For instance, to reproduce the main results, execute the following command:

sh run_main.sh

Similarly, you can specify separate scripts to run independent tasks, such as obtaining results on etth1:

sh scripts/SegRNN/etth1.sh

You can reproduce the results of the ablation learning by using other instructions:

sh scripts/SegRNN/ablation/rnn_variants.sh

Acknowledgement

We extend our heartfelt appreciation to the following GitHub repositories for providing valuable code bases and datasets:

https://github.com/yuqinie98/patchtst

https://github.com/cure-lab/LTSF-Linear

https://github.com/zhouhaoyi/Informer2020

https://github.com/thuml/Autoformer

https://github.com/MAZiqing/FEDformer

https://github.com/alipay/Pyraformer

https://github.com/ts-kim/RevIN

https://github.com/timeseriesAI/tsai

segrnn's People

Contributors

lss-1138 avatar

Watchers

 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.