Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

ESG

> 编程语言
Open source

PyTorch implementation of ESG

100 stars0 likes3 views
WebsiteGitHub

About

PyTorch implementation of ESG

Learning the Evolutionary and Multi-scale Graph Structure for Multivariate Time Series Forecasting

This is PyTorch implementation of ESG in the following paper:

Learning the Evolutionary and Multi-scale Graph Structure for Multivariate Time Series Forecasting

Requirements

Dependency can be installed using the following command:

bash
pip install -r requirements.txt

Data Preparation

Datasets for Single-Step Forecasting

Solar-Energy, Electricity, Exchange-rate datasets can be obtained from https://github.com/laiguokun/multivariate-time-series-data. Uncompress them , turn them into *.h5 files and move them to the data/h5data folder.

Wind dataset can be obtained from https://www.kaggle.com/sohier/30-years-of-european-wind-generation. Delete the CY column (All values are 0.) , and sum up the values of 24 hours per day to obtain the daily estimates of an area’s energy potential.

For convenience, you can directly download the *.h5 files of above datasets from the Google Drive or Baidu Yun, and move the h5data folder into the data folder.

Datasets for Multi-Step Forecasting

Download NYC-Bike and NYC-Taxi datasets from Google Drive or Baidu Yun . Move *.h5 files into the data/h5data/ folder and put nyc-bike and nyc-taxi folders which contain train/test/val datasets into the data/ folder.

You can also run the following commands to generate train/test/val dataset at data/{nyc-bike,nyc-taxi}/{train,val,test}.npz by using *.h5 files.

bash
cd data

# NYC-Bike
python gen_npz.py --h5_name nyc-bike

# NYC-Taxi
python gen_npz.py --h5_name nyc-taxi

Model Training

Single-step

  • Solar-Energy
bash
python train_single_step.py  --data solar-energy --expid   --num_nodes 137 --batch_size 16 --dy_embedding_dim 20 --runs 10 --horizon 3 
  • Electricity
bash
python train_single_step.py  --data electricity --expid   --num_nodes 321 --batch_size 4 --dy_embedding_dim 20 --runs 10 --horizon 3 
  • Exchange Rate
bash
python train_single_step.py  --data exchange-rate --expid   --num_nodes 8 --batch_size 4 --dy_embedding_dim 16 --runs 10 --horizon 3 
  • Wind
bash
python train_single_step.py  --data wind --expid   --num_nodes 28 --batch_size 32 --dy_embedding_dim 20 --runs 10 --horizon 3 

Multi-step

  • NYC-Bike
bash
python train_multi_step.py --data nyc-bike --expid  --num_nodes 250 --batch_size 16  --dy_embedding_dim 20 --runs 10
  • NYC-Taxi
bash
python train_multi_step.py --data nyc-taxi --expid  --num_nodes 266 --batch_size 16  --dy_embedding_dim 20 --runs 10

Run the trained Model

You can run the following command to evaluate the test datasets using the trained model.

bash
#Solar-Energy
python test_single.py  --data solar-energy --horizon 24 --expid only_test

#Electricity
python test_single.py  --data electricity --horizon 24 --expid only_test

#Exchange Rate
python test_single.py  --data exchange-rate --horizon 24 --expid only_test

#wind
python test_single.py  --data wind --horizon 24 --expid only_test

#NYC-Bike
python test_multi.py  --data nyc-bike --expid only_test

#NYC-Taxi
python test_multi.py  --data nyc-taxi --expid only_test
 

Acknowledgements

The implementation of ESG relies on resources from the following repository, we thank the original authors for open-sourcing their work.

https://github.com/nnzhan/MTGNN

Citation

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

…

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言