This is the PyTorch implementation of the Semantic and Temporal Enhanced Prediction model (STEP) and helps readers to reproduce the results in the paper "Next Location Prediction with Latent Location Semantics and Activity Time Inference".
- Model Framework
For TC datasets, the embedding dimensions of the proposed model are set to 32, while for MP, it's 16.
The Transformer encoder consists of 2 layers, each with 4 attention heads and a dropout rate of 0.1.
We train STEP for 50 epochs with a batch size of 128.
The runtime environment can be viewed in requirements.txt or by executing the following command:
pip install -r requirements.txtAll hyperparameter settings are saved in the .yml files under the respective dataset folder under saved_models/.
For example, saved_models/TC/settings.yml contains hyperparameter settings of MCLP for Traffic Camera Dataset.
-
Unzip
data/TC.ziptodata/TC. The two files are training data and testing data. -
For STEP model:
python ./model/run.py --dataset TC --dim 32
