From the course: Building Recommender Systems with Machine Learning and AI
Unlock this course with a free trial
Join today to access over 23,200 courses taught by industry experts.
User-based collaborative filtering: Hands-on - Python Tutorial
From the course: Building Recommender Systems with Machine Learning and AI
User-based collaborative filtering: Hands-on
- [Instructor] So let's make all this talk concrete and run some real code to perform user-based collaborative filtering on the MovieLens dataset. Open up Spyder. (mouse clicks) And close out any old stuff we don't need anymore. Now open up the Collaborative Filtering folder in our course materials. And load up everything in there. The file we're interested in right now is SimpleUserCF.py. So click on that tab and let's walk through it. It's surprisingly small, right? Oh, see what I did there? Surprisingly. It's because we're using the Surprise library to do a lot of the heavy lifting here. So this script just walks through the steps we talked about in the slides. It's not really integrated into the evaluation framework we developed earlier because user-based collaborative filtering as we've described is strictly for generating top-end recommendations. At no point did we attempt to predict user ratings so we can't really shoehorn this algorithm into the Surprise framework because it…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Measuring similarity and sparsity4m 49s
-
(Locked)
Similarity metrics8m 32s
-
User-based collaborative filtering7m 25s
-
(Locked)
User-based collaborative filtering: Hands-on4m 59s
-
(Locked)
Item-based collaborative filtering4m 14s
-
(Locked)
Item-based collaborative filtering: Hands-on2m 23s
-
(Locked)
Tuning collaborative filtering algorithms3m 31s
-
(Locked)
Evaluating collaborative filtering systems offline1m 28s
-
(Locked)
Measure the hit rate of item-based collaborative filtering2m 17s
-
(Locked)
KNN recommenders4m 4s
-
(Locked)
Running user- and item-based KNN on MovieLens2m 26s
-
(Locked)
Experiment with different KNN parameters4m 25s
-
(Locked)
Bleeding edge alert: Translation-based recommendations2m 29s
-
(Locked)
-
-
-
-
-
-
-
-