Skip to content
forked from ywhuazhong/CSLSL

PyTorch implementation of the paper-"Human Mobility Prediction with Causal and Spatial-constrained Multi-task Network", accepted by KDD 2022.

License

Notifications You must be signed in to change notification settings

Umaruchain/CSLSL

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSLSL

PyTorch implementation of the paper-"Human Mobility Prediction with Causal and Spatial-constrained Multi-task Network", accepted by KDD 2022.

We are glad about your interest in our work and we would appreciate it if you cite our paper.

Datasets

  • The processed data can be found in the "data" folder, which was processed by preproess.py and data_prepare.py.
  • The raw data can be found at the following open source.

Requirements

  • Python>=3.8
  • Pytorch>=1.8.1
  • Numpy
  • Pandas

Project Structure

  • /data: file to store processed data
  • /results: file to store results such as trained model and metrics.
  • data_preprocess.py: data preprocessing to filter sparse users and locations (fewer than 10 records) and merge consecutive records (same user and location on the same day).
  • data_prepare.py: data preparation for CSLSL (split trajectory and generate data).
  • train_test.py: the entry to train and test a new model.
  • evaluate.py: the entry to evalute a pretrained model.
  • model.py: model defination.
  • utils.py: tools such as batch generation and metric calculation.

Usage

  1. Evaluate a pretrained model
python evaluate.py --data_name NYC --model_name model_NYC
  1. Train and test a new model
python train_test.py --data_name NYC 

Detailed parameter description refers to evaluate.py and train_test.py

About

PyTorch implementation of the paper-"Human Mobility Prediction with Causal and Spatial-constrained Multi-task Network", accepted by KDD 2022.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%