$25
Both models use the package recommenderlab from R to learn the recommender.The first model uses method
‘UBCF’(User Based Collaborative Filtering) with parameters: normalize = ‘Z-score’, method = ‘Cosine’, nn = 5. The RMSE is:
RMSE(test$rating,ratings[-train.id,][test.id,]$rating)
## [1] 1.036137
The second model uses method ‘IBCF’(Item Based Collaborative Filtering) with default parametes. The RMSE is:
RMSE(test2$rating,ratings[-train.id,][test.id,]$rating)
## [1] 1.563345
Overall, the script may take around half an hour to run. The computer system is Macbook Pro 3.1GHz, 8GB memory.