数据集
下载地址:http://files.grouplens.org/datasets/movielens/ml-latest-small.zip
数据集1:movies.csv
1 | movieId,title,genres |
物品ID,物品名称,物品分类
数据集2: ratings.csv
1 | userId,movieId,rating,timestamp |
用户ID,物品ID,行为得分,时间戳
reader.py
用于读取数据文件,将字段转化为预定格式。
1 | # -*- coding: utf-8 -*- |
175 [‘531’, ‘2300’, ‘3594’, ‘3791’, ‘3969’, ‘7169’, ‘7259’, ‘8362’, ‘8643’, ‘8911’, ‘32289’, ‘33145’, ‘33880’, ‘38388’, ‘44613’, ‘45880’, ‘47382’, ‘56949’, ‘58107’]
6615 [‘Freddy vs. Jason (2003)’, ‘Action|Horror|Thriller’]