This is the code base of CSIT 5210 project. Forked from CodeYu-RecQ.
According to upstream repo:
RecQ is a Python library for recommender systems (Python 2.7.x) in which a number of the state-of-the-art recommendation models are implemented.
Since this repository is still using python 2 and tensorflow 1, we need some extra configuration to make this work. Follow these steps to setup your envirnoment:
-
Install anaconda https://www.anaconda.com/products/individual
-
Open anaconda navigator (Not the terminal)
- Click "Environments"
- Click "Import"
- Select file "environment.yaml" in this directory and click "Import"
-
After everything is done, open your newly created environment and launch a terminal
-
Go to
/main
and executepython main.py
-
Select your model to check running status
Open anaconda navigator (Not the terminal)
- Click "Environments"
- Click "Import"
- Select file "environment.yaml" in this directory and click "Import"
Use pip install
to install tensorflow packages in ./tensorflow
package.
-
After everything is done, open your newly created environment and launch a terminal
-
Go to
/main
and executepython main.py
-
Select D5/D7 model to check running status
For some models that requires negative review dataset, If you want to preprocess data to train negative datasets, use the script in tool/negativeReview.py
Set global params like this
FEEDBACK_COLUMN_ID = 2 # Which column is the feedback column
NEGATIVE_THRESHOLD = 3 # The upper-bond of review score
DATASET_PATH = '../dataset/douban_trimmed/ratings.txt'
OUTPUT_PATH = '../dataset/douban_trimmed/ratings_n.txt'
If you want to run new dataset on RSGAN model, you need to manually create a negative review set before feeding it to training model.
For example, for douban dataset, any data that is under rating 3 is consider as negative review. Name the file as [model]_n.txt
and put it to the same directory with original rating data.
If you encounter tensorflow not found issue, make sure you install tensorflow 1.14 and check installed package by running
pip list