版本说明
Amazon Review Dataset包含了amazon上用户对商品的评论数据,目前最新已经到2018版了,各版链接:
(1)2018:https://nijianmo.github.io/amazon/index.html
(2)2014:http://jmcauley.ucsd.edu/data/amazon/index_2014.html
(3)2013:http://snap.stanford.edu/data/web-Amazon-links.html
总的来说,数据量越来越大,数据字段越来越多啦。
数据样例
我使用2013版进行实验,至于为什么选这一版,主要是其他两版数据量太大了,虽然其他两版都有精简版本,但是精简版本没有元数据,比如商品的类别等。
字段说明
product/productId: asin, e.g. amazon.com/dp/B00006HAXW
product/title: title of the product
product/price: price of the product
review/userId: id of the user, e.g. A1RSDE90N6RSZF
review/profileName: name of the user
review/helpfulness: fraction of users who found the review helpful
review/score: rating of the product
review/time: time of the review (unix time)
review/summary: review summary
review/text: text of the review
用户行为预测
通常一个用户会有多条评论,如果我们取出review/userId、product/productId、review/time这三列,按照(用户id,评论时间)进行聚合,就可以得到用户最新评论商品ID和用户历史评论商品id列表,即(用户id,[商品id1,商品id2,商品id3,…],当前评论商品id),进行编码转换后,数据就长这样了:
(9235, [24171, 25859, 28646, 11647, 37061], 21097)。这样我们就可以训练一个模型,根据用户历史评论行为预测用户接下来的评论商品id。
当然,我们也可以在历史行为序列中加入用户的评分等等,这样就可以预测更加丰富的内容了,比如用户对下一个商品的评分等等。