This is our implementation for the paper:
Xinyu Guan, Zhiyong Cheng, Xiangnan He, Yongfeng Zhang, Zhibo Zhu, Qinke Peng and Tat-Seng Chua. Attentive Aspect Modeling for Review-aware Recommendation[J]. ACM Transactions on Information Systems (TOIS).
Please cite our TOIS paper if you use our codes.
- tensorflow 1.2.1
- gensim 2.2.0
We provide the processed Amazon Beauty core-5 dataset. The original dataset can be found in here.
Beauty dataset.
users.txt:
- The users' names in the orignal dataset.
- Line
n
is the orginal name of user whose id isn-1
product.txt:
- The products' names in the orignal dataset.
- Line
n
is the orginal name of product whose id isn-1
aspect.txt:
- The aspects' names.
- We use Sentires to extract aspects from user reviews. The tool is available at here.
- Line
n
is the orginal name of aspect whose id isn-1
user_aspect_rank.txt:
- The aspect set of each user.
- Line
n
is the aspect set of user whose id isn-1
: aspect1,aspect2,...
item_aspect_rank.txt:
- The aspect set of each product.
- Line
n
is the aspect set of product whose id isn-1
: aspect1,aspect2,...
emb128.vector:
- The word embedding pretrained with Word2vec model (implemented with gensim).
- Use
gensim.models.KeyedVectors.load_word2vec_format
to load the embedding matrix.
train_pairs.txt:
- Positive (user, item) pairs in training set.
- Each line is a training instance: userId,itemId
valid_pairs.txt
- Positive (user, item) pairs in validation set.
- Each line is an instance: userId,itemId
test_pairs.txt:
- Positive (user, item) pairs in test set.
- Each line is a test instance: userId,itemId
The instruction of commands has been clearly stated in the codes (see the parse_args function).
Run aarm:
python running.py --productName Beauty --is_l2_regular 1 --lamda_l2 0.1 --is_out_l2 0 --dropout 0.5 --learning_rate 0.003 --num_aspect_factor 128 --num_mf_factor 128