Skip to content

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

Notifications You must be signed in to change notification settings

WangXFng/STaTRL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Right now the code only supports single GPU training, but an extension to support multiple GPUs should be easy.
  • If there is any problem, please contact to [email protected] or [email protected].

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}
}

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published