Neural-Attentive-Session-Based-Recommendation-PyTorch
Neural-Attentive-Session-Based-Recommendation-PyTorch copied to clipboard
A PyTorch implementation of Neural Attentive Session Based Recommendation (NARM)
Neural-Attentive-Session-Based-Recommendation-PyTorch
A PyTorch implementation of the NARM model in Neural Attentive Session Based Recommendation (Li, Jing, et al. "Neural attentive session-based recommendation." Proceedings of the 2017 ACM on Conference on Information and Knowledge Management. ACM, 2017).

Usage
- Install required packages from requirements.txt file.
pip install -r requirements.txt
-
Download datasets used in the paper: YOOCHOOSE and DIGINETICA. Put the two specific files named
train-item-views.csvandyoochoose-clicks.datinto the folderdatasets/ -
Change to
datasetsfold and runpreprocess.pyscript to preprocess datasets. Two directories named after dataset should be generated underdatasets/.
python preprocess.py --dataset diginetica
python preprocess.py --dataset yoochoose
- Run main.py file to train the model. You can configure some training parameters through the command line.
python main.py
- Run main.py file to test the model.
python main.py --test