百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
E

ESG

> 编程语言
开源

PyTorch 实现 ESG

100 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

PyTorch 实现 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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

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