From the course: Machine Learning and AI Foundations: Recommendations
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Recommend by predicting missing user ratings
From the course: Machine Learning and AI Foundations: Recommendations
Recommend by predicting missing user ratings
- [Narrator] Let's take a look at create review matrix as csv.py. This code will generate a csv representation of the review matrix that we can open in a spreadsheet. First we load the data using Panda's read_csv function. Then we use Panda's pivot_table function to create the review matrix. Finally, we'll use Panda's to_csv function to save the result as a csv file. Let's run the code. Right click and choose run. Great. Now let's open that file in our spreadsheet application. I'm using Numbers but any spreadsheet application should work. This is our review matrix. There's one row for each user and one column for each movie. Each number represents a review entered by a user. Blank spaces represent movies that have not yet been reviewed by a user. Imagine if we could figure out a way to fill in all the blank spaces based on the numbers we know. For example, let's look at user number three. We can see that user number three gave four stars to movie one and movie two, and five stars to…
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.