This is our Tensorflow implementation for SSM.
This project is based on NeuRec. Thanks to the contributors.
The code runs well under python 3.7.7. The required packages are as follows:
- Tensorflow-gpu == 1.15.0
- numpy == 1.19.1
- scipy == 1.5.2
- pandas == 1.1.1
- cython == 0.29.21
Firstly, download this repository and unpack the downloaded source to a suitable location.
Secondly, go to './NeuRec' and compline the evaluator of cpp implementation with the following command line:
python setup.py build_ext --inplace
If the compilation is successful, the evaluator of cpp implementation will be called automatically. Otherwise, the evaluator of python implementation will be called.
Note that the cpp implementation is much faster than python.
Thirdly, specify dataset and recommender in configuration file NeuRec.properties.
Finally, run main.py in IDE or with command line:
python main.py --recommender=SSM --data.input.dataset=gowalla --n_layers=1 --temp=0.12 --reg=1e-5
python main.py --recommender=SSM --data.input.dataset=yelp2018 --n_layers=1 --temp=0.14 --reg=1e-5
python main.py --recommender=SSM --data.input.dataset=amazon-book --n_layers=3 --temp=0.1 --reg=1e-1
python main.py --recommender=SSM --data.input.dataset=ifashion --n_layers=1 --temp=0.22 --reg=1e-3