Book Image

Hands-On Recommendation Systems with Python

By : Rounak Banik
Book Image

Hands-On Recommendation Systems with Python

By: Rounak Banik

Overview of this book

Recommendation systems are at the heart of almost every internet business today; from Facebook to Net?ix to Amazon. Providing good recommendations, whether it's friends, movies, or groceries, goes a long way in defining user experience and enticing your customers to use your platform. This book shows you how to do just that. You will learn about the different kinds of recommenders used in the industry and see how to build them from scratch using Python. No need to wade through tons of machine learning theory—you'll get started with building and learning about recommenders as quickly as possible.. In this book, you will build an IMDB Top 250 clone, a content-based engine that works on movie metadata. You'll use collaborative filters to make use of customer behavior data, and a Hybrid Recommender that incorporates content based and collaborative filtering techniques  With this book, all you need to get started with building recommendation systems is a familiarity with Python, and by the time you're fnished, you will have a great grasp of how recommenders work and be in a strong position to apply the techniques that you will learn to your own problem domains.
Table of Contents (9 chapters)

The simple recommender

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.
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:

  1. Choose a metric (or score) to rate the...