This work "Time-Aware Location Prediction by Convolutional Area-of-Interest Modeling and Memory-Augmented Attentive LSTM" has been published in TKDE 2022.
t-LocPred is a novel time-aware location prediction model for Point of Interests (POIs) recommendation. It consists of a convolutional AoI modeling module (ConvAOI) and memory-augmented attentive LSTM (mem-attLSTM). It captures both coarse- and fine-grained spatiotemporal correlations among a user’s historical check-ins and models his/her long-term movement patterns.
- Python == 3.7 (Recommend to use Anaconda or Miniconda)
- PyTorch == 1.8.1
- NVIDIA GPU (RTX 3090) + CUDA 11.1
- Clone repo
git clone https://github.com/BIT-MCS/Time-Aware-Location-Prediction.git cd Time-Aware-Location-Prediction
- Install dependent packages
pip install -r requirements.txt
- You can modify the config file one_day_data_general/conf.py for data preparation.
For example, you can control the length of check-in sequences by modifying this line:
[41] 'seq_len': 8,
- Using the following commands to process the original datasets and generalize the data for t-LocPred.
cd one_day_data_general python main.py
We provide complete training codes for t-LocPred.
You could adapt it to your own needs.
- If you don't have NVIDIA RTX 3090, you should comment these two lines in file utils.py.
[19] torch.backends.cuda.matmul.allow_tf32 = False [20] torch.backends.cudnn.allow_tf32 = False
- You can modify the config files
step1model/ConvAOI/conf.py.
For example, you can control the hyperparameter about CNN kernal size in convolutional AoI modeling module by modifying this line:[31] 'cnn_kernel_size': 3,
- Training the ConvAOI module:
cd step1model/ConvAOI python main.py
- Training the mem-attLSTM module:
cd step2model/mem-attLSTM python main.py
- Running the ConvAOI module:
cd step1model/ConvAOI python test.py
- Running the mem-attLSTM module:
cd step2model/mem-attLSTM python test.py
If you have any question, please email [email protected]
.
If you are interested in our work, please cite our paper as
@ARTICLE{9128016,
author={Liu, Chi Harold and Wang, Yu and Piao, Chengzhe and Dai, Zipeng and Yuan, Ye and Wang, Guoren and Wu, Dapeng},
journal={IEEE Transactions on Knowledge and Data Engineering},
title={Time-Aware Location Prediction by Convolutional Area-of-Interest Modeling and Memory-Augmented Attentive LSTM},
year={2022},
volume={34},
number={5},
pages={2472-2484},
doi={10.1109/TKDE.2020.3005735}
}