This repository contains the code for replicating results from
- A Dynamic Embedding Method for Passenger Flow Estimation
- Wei-Yi Chung; Yen-Nan Ho; Yu-Hsuan Wu; Jheng-Long Wu
- In 2021 10th International Congress on Advanced Applied Informatics (IIAI-AAI)
- Slide | Competitive Paper Award
- Clone the repo and get in to project
cd ./Project
- Build a new virtual environment
- Install python3 requirements:
pip install -r requirements.txt
- Run
cd ./model
to the model folder - Use your own dataset (optional)
- Construct the longtitude and latitude information of station in to mrt_vd.csv
- Adjustment the format of passanger flow data to the demo input format
- Run
python distance_matrix
to create the distance matrix
- Build training data, run
python Data_preparing_threeloss
to generate the training data - Train your own models of pretrained stage
- repace the station feature from Node2Vec to BERT output in GMAN
- Experiment configurations are found in
./model/BERT_three_loss/run_train.sh
- Training:
sh run_train.sh
- Results model and logs are stored in the
output
directory underBERT_three_loss
. - Evaluation:
python ./BERT_three_loss/predict_embedding.py