Thank you for your interest in our work LoTNext, published in the paper Taming the Long Tail in Human Mobility Prediction.
This work is the first to propose a general framework for the next POI prediction under the long-tail problem.
conda create -n LoTNext python==3.8
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
conda install pyg -c pyg
Note: For steps 1 and 2, choose one to execute.
1. place check-in_data.zip into ./data/ and unzip the file as follows:
./data/checkins-gowalla.txt
./data/checkins-4sq.txt
Note: These are raw check-in datasets, if you want to change the preprocess rules, you need to comment out these codes of train.py as follows:
with open(setting.loader_file, 'rb') as f:
poi_loader = pickle.load(f)
In addition, restore these commented codes of train.py, as follows:
# load dataset
# poi_loader = PoiDataloader(
# setting.max_users, setting.min_checkins) # 0, 5*20+1
# poi_loader.read(setting.dataset_file)
2. place check-in_dataloader.zip into ./data/ and unzip the file as follows:
./data/poi_loader-gowalla.pkl
./data/poi_loader-4sq.pkl
Note: Unzip, you don't need to comment out any codes.
3. place Graphs.zip into ./KGE/POI_graph/ and unzip the file as follows:
./KGE/POI_graph/gowalla_scheme2_transe_loc_temporal_100.pkl
- Gowalla
python train.py --dataset checkins-gowalla.txt --dataloader poi_loader-gowalla.pkl --trans_loc_file ./KGE/POI_graph/gowalla_scheme2_transe_loc_temporal_100.pkl --trans_interact_file ./KGE/POI_graph/gowalla_scheme2_transe_user-loc_100.pkl --log_file ./results/log_gowalla --model_file ./model_log/model_gowalla
- Foursquare
python train.py --dataset checkins-4sq.txt --dataloader poi_loader-4sq.pkl --trans_loc_file ./KGE/POI_graph/foursquare_scheme2_transe_loc_temporal_20.pkl --trans_interact_file ./KGE/POI_graph/foursquare_scheme2_transe_user-loc_100.pkl --log_file ./results/log_foursquare --model_file ./model_log/model_4sq
If you are interested in our work, please cite it as:
@article{xu2024taming,
title={Taming the Long Tail in Human Mobility Prediction},
author={Xu, Xiaohang and Jiang, Renhe and Yang, Chuang and Fan, Zipei and Sezaki, Kaoru},
journal={Advances in Neural Information Processing Systems},
volume={},
pages={},
year={2024}
}
If you have any questions, please contact xhxu@g.ecc.u-tokyo.ac.jp or publish the new issues. (English, Chinese, and easy Japanese are ok for me
)
This work is partly based on Graph-Flashback and Flashback. We sincerely thank their great works and cite them in the paper. 🙇♂️
