Building a movie recommendation system
Now that we have all the building blocks in place, it's time to build a movie recommendation system. We learned all the underlying concepts that are needed to build a recommendation system. In this section, we will build a movie recommendation system based on the data provided in the file ratings.json
. This file contains a set of people and their ratings for various movies. When we want to find movie recommendations for a given user, we will need to find similar users in the dataset and then come up with recommendations for this person.
Create a new Python file and import the following packages:
import argparse import json import numpy as np from compute_scores import pearson_score from collaborative_filtering import find_similar_users
Define a function to parse the input arguments. The only input argument would be the name of the user:
def build_arg_parser(): parser = argparse.ArgumentParser(description=...