MulSTE
June 8, 2024 · View on GitHub
This is the origin Pytorch implementation of MulSTE in the following paper:
[KDD' 24] MulSTE: A Multi-view Spatio-temporal Learning Framework with Heterogeneous Event Fusion for Demand-supply Prediction
Requirements
- Python 3.8
- matplotlib == 3.1.1
- numpy == 1.19.4
- pandas == 1.3.3
- torch == 1.9.0
- transformers == 4.11.3
- tqdm == 4.62.3
- lxml == 4.6.3
Dependencies can be installed using the following command:
pip install -r requirements.txt
Folder Structure
└── MulSTE
├── config
│ |── data.conf
│ |── data_zz.conf
├── lib
│ |── figure_plot.py
│ |── utils.py
│ |── utils_fix_normalization.py
│ |── utils_fix_normalization_zz.py
├── model
│ |── fine_tuned_bert
│ |── pre_trained_bert
│ |── MulSTE_model.py
│ |── MulSTE_model_zz.py
├── MulSTE_train.py
├── MulSTE_train_zz.py
├── README.md
└── requirements.txt
Reproducibility
- Acquire Pre-trained BERT: Download
pytorch_model.binfrom Hugging Face and put it intomodel\pre_trained_bert\chinese-macbert-basefolder. - Fine-tune BERT: Run
Model_Fine_Tuning.ipynbinmodel\fine_tuned_bertfolder to fine-tune the Pre-trained BERT, and put the outputfine-tuned-bert.modelintomodel\fine_tuned_bertfolder. - Demand-supply Prediction: Then, all training and inference processes can be run at once, as follows.
Shanghai:
python MulSTE_train.py
Zhengzhou:
python MulSTE_train_zz.py