All Projects → fajieyuan → Nextitnet

fajieyuan / Nextitnet

Licence: mit
A Simple Convolutional Generative Network for Next Item Recommendation

Programming Languages

python
139335 projects - #7 most used programming language

strongly suggest running the code on GPU, which is at least 20 times faster than on CPU. You can email me if you have any questions about the performance and efficiency of NextItNet.

If you want to use this model in product with extremely large items (e.g.,> 100 million items). You may have memory problem during training and prediction by using nextitrec.py. In this case, you just use our negative sampling setting for training, and recalled items for predicting instead of outputing a huge softmax, as shown in nextitrec__recall.py.

In general, NextItNet is able to handle several millions of items with billions of interaction feedback, and performs much faster and better than LSTM/GRU using the same training setttings.

There are many tricks to solve memory and efficiency problems and you can email me if you donot know how to do it. It is also very easy to add various features by concating (tf.concat) operation before convolution or after convolution.

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 or download a large sequential dataset of tiktok: https://pan.baidu.com/s/1sdvA-prlW8cBVtFuuiqF3Q
code (提取码):wncu

References

nextitnet

A Simple Convolutional Generative Network for Next Item Recommendation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].