A model zoo that contains different review-based collaborative filtering models of rating prediction task for recommendation.
Model Name | |
---|---|
1 | DeepCoNN |
2 | DARR |
3 | MACF |
Model Name | |
---|---|
1 | DeepCLFM |
2 | NCEM |
The experimental dataset is Amazon Review DataSet, which can be downloaded here.
The pre-trained word vector is glove.6B, which can be downloaded here.
According to the mapping method of review text, there are two strategies to preprocess the dataSet.
DataPreprocessor | Description | Directory | |
---|---|---|---|
1 | wordVectorBased_data_preprocess.py |
split train, valid and test dataSet. Represent the review by word vectors. You may choose different dataSet and modify the preprocess params in the first serveral lines of this code | /Model_Zoo |
2 | bertBased_data_preprocess.py |
split train, valid and test dataSet. Represent the review by BERT's embedding. You may choose different dataSet and modify the preprocess params in the first serveral lines of this code | /Model_Zoo |
Model Name | Directory | |
---|---|---|
1 | DeepCoNN.py |
Model_Zoo/models/ |
2 | DARR.py |
Model_Zoo/models/ |
3 | MACF.py |
Model_Zoo/models/ |
Model Name | Directory | |
---|---|---|
1 | DeepCLFM.py |
Model_Zoo/models/ |
2 | NCEM.py |
Model_Zoo/models/ |
Runner | Description | Directory | |
---|---|---|---|
1 | run_wordVectorBased_model.py |
rnn the wordVectorBased models, you may choose the specific model by commenting out codes nearly line 478 | /Model_Zoo |
2 | run_bertBased_model.py |
rnn the wordVectorBased models, you may choose the specific model by commenting out codes nearly line 425 | /Model_Zoo |
Make sure the glove pre-trained word vector (download). and Amazon Review DataSet (download) in the following directory:
/Model_Zoo/data/
Automotive_5
Automotive_5.json
glove.6B
glove.6B.50d.txt
glove.6B.100d.txt
glove.6B.200d.txt
glove.6B.300d.txt
If you run the WordVectorBased Models
, first to run the wordVectorBased_data_preprocess.py
, and then run the run_wordVectorBased_model.py
.
If you run the BertBased Models
, first to make sure the bert_service
is started (How to start bert_service
can read here). Run the bertBased_data_preprocess.py
(My bert_service machine's IP is 10.1.63.214, so you can change the IP of your bert_service machine in the first serveral lines of this code), and then run the run_bertBased_model.py
.