A python code collection for top-k recommendation refactored by tensorflow
The old repository is here.
Current implementation is purely based on python, however, its speed is slower than the old one.
The collection will consist of following methods:
All the code in the repository is written in Python 3.
To simplify the installation of Python 3, please use Anaconda.
The dependencies are numpy, scipy, tensorflow.
After forking, you should configure several things before running the code:
For training, you can run
python train.py
For evaluation, you can run
python evaluate.py -d data -m embed/cer -f 0 -sl im om
This will evaluate cer's performance in both in-matrix and out-of-matrix settings with content feature (In our example, this is meta).
By default, the evaluation will report accuracy@5,10,15,20,25 and 30.
Due to the file size limitation, datasets for training and testing are hosted by other places.
At present, we provide two datasets derived from Movielens 10M and Netflix:
Movielens: ratings and features
Netflix: rating and features
Each of them will have following data files for experiments:
Please modify the access path inside code to make the execution correctly.
The original 10380 videos can be downloaded from below link:
Google Drive
The video meta information such as title, plot and actors are in imdbpy.tgz.
The meta information uses imdbpy.
Please install it first and use pickle to read provided files in the binary mode.
For instance, you can access the imdbpy object for video 999 by:
>>> import imdb
>>> import pickle
>>> meta_999 = pickle.load(open('999.pkl', 'rb'))
If you use above codes or data, please cite the paper below:
@article{VCRS,
author = {Xingzhong Du and Hongzhi Yin and Ling Chen and Yang Wang and Yi Yang and Xiaofang Zhou},
title = {Personalized Video Recommendation Using Rich Contents from Videos},
journal = {TKDE},
year = {2019}
}
128 commits
Python
83.1%
C++
14.7%
C
1.9%
A python code collection for top-k recommendation refactored by tensorflow
The old repository is here.
Current implementation is purely based on python, however, its speed is slower than the old one.
The collection will consist of following methods:
All the code in the repository is written in Python 3.
To simplify the installation of Python 3, please use Anaconda.
The dependencies are numpy, scipy, tensorflow.
After forking, you should configure several things before running the code:
For training, you can run
python train.py
For evaluation, you can run
python evaluate.py -d data -m embed/cer -f 0 -sl im om
This will evaluate cer's performance in both in-matrix and out-of-matrix settings with content feature (In our example, this is meta).
By default, the evaluation will report accuracy@5,10,15,20,25 and 30.
Due to the file size limitation, datasets for training and testing are hosted by other places.
At present, we provide two datasets derived from Movielens 10M and Netflix:
Movielens: ratings and features
Netflix: rating and features
Each of them will have following data files for experiments:
Please modify the access path inside code to make the execution correctly.
The original 10380 videos can be downloaded from below link:
Google Drive
The video meta information such as title, plot and actors are in imdbpy.tgz.
The meta information uses imdbpy.
Please install it first and use pickle to read provided files in the binary mode.
For instance, you can access the imdbpy object for video 999 by:
>>> import imdb
>>> import pickle
>>> meta_999 = pickle.load(open('999.pkl', 'rb'))
If you use above codes or data, please cite the paper below:
@article{VCRS,
author = {Xingzhong Du and Hongzhi Yin and Ling Chen and Yang Wang and Yi Yang and Xiaofang Zhou},
title = {Personalized Video Recommendation Using Rich Contents from Videos},
journal = {TKDE},
year = {2019}
}
128 commits
Python
83.1%
C++
14.7%
C
1.9%