From the course: Building Recommender Systems with Machine Learning and AI
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Evaluating collaborative filtering systems offline - Python Tutorial
From the course: Building Recommender Systems with Machine Learning and AI
Evaluating collaborative filtering systems offline
- [Instructor] Now, although we can't measure accuracy with user-based or item-based collaborative filtering because they don't make rating predictions, we can still measure hit rate because it is still just a top-end recommender. So let's go back to spider have a look at our evaluateusercf.py file. This looks a lot like our simple usercf file but we set things up to do leave-one-out cross validation and we're using our recommender metrics package to measure hit rate on it. There's not a lot of new code to talk about here, we just generate the leave-one-out to test set up top here and use that when evaluating things at the end. And instead of just printing out the results, we store them so we can measure them, and we also generate up to 40 recommendations per user instead of 10. Also, we're generating recommendations for everyone, and not just a single test user. Let's run it out of curiosity. That was surprisingly fast, even though we're generating recommendations for everybody and…
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)
-
-
-
-
-
-
-
-