strongly suggest running the code on GPU, which is at least 20 times faster than on CPU
Please cite this paper if you find our code is useful
@inproceedings{yuan2018simple, title={A Simple Convolutional Generative Network for Next Item Recommendation }, author={Yuan, Fajie and Karatzoglou, Alexandros and Arapakis, Ioannis and Jose, Joemon M and He, Xiangnan}, booktitle={Proceedings of the Twelfth ACM International Conference on Web Search and Data Mining}, year={2019}, organization={ACM} }
1 )you can run nextitrec.py (python nextitrec.py) directly, which includes training and testing
2 )you can also run nextitrec_generate.py, which is only for predicting/generating. But you need make sure whether your model variables have been saved when you run nextitrec.py.
3 )MostPop.py is a baseline based on item popularity
Your training data should be some sequences of the same length, if the sequences are not the same length, padding 0 in the beggining, e.g.,
1,44,67,78,1000
0,0,88,98,1
0,88,981,13,17
Your testing data can be any length, but suggest you first using the same length for evalution, once you are familar with the model, you can change your data or slightly change the code to meet your requirements.
note that the attached dataset is very small, you can use the user-filter-20000items-session5.csv.zip We are trying to release a sequential dataset, which has very good sequence properties.
- Tensorflow GatedCNN code
- Tensorflow PixelCNN code
- Tensorflow Wavenet code
- Tensorflow Bytenet code
- Tensorflow Convolutional Seq2Seq code
- Sugar Tensor Source Code code
- Tensorflow Convolutional Neural Networks for Sentence Classification code
- Tensorflow RNN code
A Simple Convolutional Generative Network for Next Item Recommendation