Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Recommendation Systems with Python

You're reading from  Hands-On Recommendation Systems with Python

Product type Book
Published in Jul 2018
Publisher Packt
ISBN-13 9781788993753
Pages 146 pages
Edition 1st Edition
Languages
Author (1):
Rounak Banik Rounak Banik
Profile icon Rounak Banik

User-based collaborative filtering

In Chapter 1, Getting Started with Recommender Systems, we learned what user-based collaborative filters do: they find users similar to a particular user and then recommend products that those users have liked to the first user.

In this section, we will implement this idea in code. We will build filters of increasing complexity and gauge their performance using the framework we constructed in the previous section.

To aid us in this process, let's first build a ratings matrix (described in Chapters 1, Getting Started with Recommender Systems and Chapter 5, Getting Started with Data Mining Techniques) where each row represents a user and each column represents a movie. Therefore, the value in the ith row and jth column will denote the rating given by user i to movie j. As usual, pandas gives us a very useful function, called pivot_table, to...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}