/STaTRL

STaTRL: Spatial-Temporal and Text Representation Learning for POI recommendation, Applied Intelligence 2023.

Primary LanguagePython

STaTRL APIN'23

Applied Intelligence 2023.

dataset # Users # POI
Yelp2020 28038 # 15745
Yelp 30887 # 18995
Gowalla 18737 # 32510
Foursquare 7642 # 28483

Dependencies

  • Python 3.7.6
  • Anaconda 4.8.2 contains all the required packages.
  • PyTorch version 1.7.1.

Instructions

1. Preprocessing

  • If you have already got the processed data which are train_6.pkl and test_6.pkl, skip to 2. (Training).
  • otherwise
    • In the folder of albert, there are five steps to preprocess the original Yelp open review data, which we used is version-2020.
    • step 1 training the albert-model.
    • step 2 filtering the POIs which have less than 10 visits and users who have visited less than 10 POIs, and obtain the numeric ids of POIs and users. In this step you can obtain the number of POIs and users, then you may need modify TYPE_NUMBER and USER_NUMBER in transformer.Constants.
    • step 3 to generate the dictionary which you can obtain the top category through the numeric ids of the POIs.
    • step 4 to obtain the text visit sequence -- Yelp_reviews_test.txt.
    • step 5 to compute the distance matrix of all POIs.
    • step 6 generate the input data, train_6.pkl and test_6.pkl

2. Training

sh run.sh

Note

If this repository helps you, please cite:

@article{wang2023statrl,
  title={STaTRL: Spatial-temporal and text representation learning for POI recommendation},
  author={Wang, Xinfeng and Fukumoto, Fumiyo and Li, Jiyi and Yu, Dongjin and Sun, Xiaoxiao},
  journal={Applied Intelligence},
  volume={53},
  number={7},
  pages={8286--8301},
  year={2023},
  publisher={Springer}
}