Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building a Recommendation System with R

You're reading from  Building a Recommendation System with R

Product type Book
Published in Sep 2015
Publisher
ISBN-13 9781783554492
Pages 158 pages
Edition 1st Edition
Languages

Data preparation


This section will show you how to prepare the data to be used in recommender models. Follow these steps:

  1. Select the relevant data.

  2. Normalize the data.

Selecting the most relevant data

When we explored the data, we noticed that the table contains:

  • Movies that have been viewed only a few times. Their ratings might be biased because of lack of data.

  • Users who rated only a few movies. Their ratings might be biased.

We need to determine the minimum number of users per movie and vice versa. The correct solution comes from an iteration of the entire process of preparing the data, building a recommendation model, and validating it. Since we are implementing the model for the first time, we can use a rule of thumb. After having built the models, we can come back and modify the data preparation.

We will define ratings_movies containing the matrix that we will use. It takes account of:

  • Users who have rated at least 50 movies

  • Movies that have been watched at least 100 times

The preceding points...

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 $15.99/month. Cancel anytime}