The first step in building our simple recommender is setting up our workspace. Let's create a new directory named Chapter3. Create a Jupyter Notebook in this directory named Simple Recommender and open it in the browser.
Let's now load the dataset we used in the previous chapter into our notebook.
In case you have not downloaded it already, the dataset is available at
https://www.kaggle.com/rounakbanik/the-movies-dataset/downloads/movies_metadata.csv/7.
https://www.kaggle.com/rounakbanik/the-movies-dataset/downloads/movies_metadata.csv/7.
import pandas as pd
import numpy as np
#Load the dataset into a pandas dataframe
df = pd.read_csv('../data/movies_')
#Display the first five movies in the dataframe
df.head()
Upon running the cell, you should see a familiar table-like structure output in the notebook.
Building the simple recommender is fairly straightforward. The steps are as follows:
- Choose a metric (or score) to rate the...