From the course: Machine Learning and AI Foundations: Recommendations
Unlock the full course today
Join today to access over 23,700 courses taught by industry experts.
Explore our system’s recommendations
From the course: Machine Learning and AI Foundations: Recommendations
Explore our system’s recommendations
- [Instructor] Now that we have a working product recommendation system let's see what results we get for different users. Let's take a look at make_recommendations.py. First we'll read in the data set using panda's read csv command. We'll also load the movie list using read csv so we have access to the movie titles as well. Then we'll use panda's pivot table function to create the review matrix, then we'll factor the review matrix to get the U and M matrices. Then we'll multiply U and M to create the predicted ratings for each user. Now that we have predicted ratings we can make predictions. Here we'll prompt for a user ID that way the user can type in any user ID to see recommendations for different users. Before we print out the users recommended movies, let's print out the movies the user has already rated themself. We can look them up in the raw data set df data frame. We'll ask pandas to filter down the list to the entries where the user ID is the same one as the user just typed…
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.