UserBasedCF and ItemBasedCF tested on MovieLens 1M dataset.
基于Movielens-1M数据集实现的UserBasedCF和ItemBasedCF推荐算法
Implementation of UserCF and ItemCF algorithm.
The programs are tested on Movielens 1M dataset. You can download this dataset by this link ml-1m.zip.
The recommendation result is evaluated by Precision, Recall, Coverage and Popularity.
- Put the "ml-1m" folder in the directory MovieLens-RecSys.
- Simply run command:
python usercf.py
This command will let the program run in back stage and run.log will record all outputs of the program.
In UserBasedCF,the program will generate a big matrix which comsumes a lot of memories (about 2.2GB in my computer). So make sure that your computer have enough memories to run the program. ItemBasedCF doesn't have the problem of memories.