SRGNN_PyG_Playground
A reimplementation of SRGNN.
Original code from here. Original paper.
Borrow the data preprocessing from original repo, including diginetica
and yoochoose
.
Using PyTorch 1.8.0, PyTorch-Geometric 1.7 and tqdm.
Data preparation
-
Download datasets used in the paper: YOOCHOOSE and DIGINETICA. Put the two specific files named
train-item-views.csv
andyoochoose-clicks.dat
into the folderdatasets/
-
Change to
datasets
fold and runpreprocess.py
script to preprocess datasets. Two directories named after dataset should be generated underdatasets/
.
python preprocess.py --dataset diginetica
python preprocess.py --dataset yoochoose
Training and testing
cd src
# python main.py --dataset=diginetica
nohup python -u main.py --dataset=diginetica > ../log/train_diginetica.log 2>&1 &
nohup python -u main.py --dataset=yoochoose1_4 > ../log/train_yoochoose1_4.log 2>&1 &
nohup python -u main.py --dataset=yoochoose1_64 > ../log/train_yoochoose1_64.log 2>&1 &
nohup python -u main.py --dataset=diginetica --use_san > ../log/train_diginetica_san.log 2>&1 &
tensorboard --logdir=../log
Citation
If you make advantage of the SR-GNN model in your research, please cite the following:
@inproceedings{Wu:2019vb,
author = {Wu, Shu and Tang, Yuyuan and Zhu, Yanqiao and Wang, Liang and Xie, Xing and Tan, Tieniu},
title = {Session-based Recommendation with Graph Neural Networks},
booktitle = {Proceedings of The Twenty-Third AAAI Conference on Artificial Intelligence},
series = {AAAI '19},
year = {2019},
url = {http://arxiv.org/abs/1811.00855}
}