Intro to content-based recommendations

Building Recommendation Engines in Python

Rob O'Callaghan

Director of Data

What are content-based recommendations?

Image showing a book similar to the one the user liked being recommended.

Building Recommendation Engines in Python

Items' attributes or characteristics

Image of a book and its attributes.

Building Recommendation Engines in Python

Vectorizing your attributes

ITEM Attribute 1 Attribute 2 Attribute 3 Attribute 4
Item_001 0 1 1 0
Item_002 1 0 1 0
Item_003 0 1 0 1
Building Recommendation Engines in Python

One to many relationships

Book Genre
The Hobbit Adventure
The Hobbit Fantasy
The Great Gatsby Tragedy
... ...
Book Adventure Fantasy Tragedy ...
The Hobbit 1 1 0 ...
The Great Gatsby 0 0 1 ...
... ... ... ... ...
Building Recommendation Engines in Python

Crosstabulation

pd.crosstab(                     ,                       )
Building Recommendation Engines in Python

Crosstabulation

pd.crosstab(book_genre_df['Book'], book_genre_df['Genre'])
Book Adventure Fantasy Tragedy Social commentary
The Hobbit 1 1 0 0
The Great Gatsby 0 0 1 1
A Game of Thrones 0 1 0 0
Macbeth 0 0 1 0
... ... ... ... ...
Building Recommendation Engines in Python

Let's practice!

Building Recommendation Engines in Python

Preparing Video For Download...