基于内容的推荐简介

用 Python 构建推荐引擎

Rob O'Callaghan

Director of Data

什么是基于内容的推荐?

显示向用户推荐与其喜欢的书相似的书的图像。

用 Python 构建推荐引擎

项目的属性或特征

一本书及其属性的图像。

用 Python 构建推荐引擎

将属性向量化

项目 属性 1 属性 2 属性 3 属性 4
Item_001 0 1 1 0
Item_002 1 0 1 0
Item_003 0 1 0 1
用 Python 构建推荐引擎

一对多关系

书籍 体裁
The Hobbit Adventure
The Hobbit Fantasy
The Great Gatsby Tragedy
... ...
书籍 冒险 奇幻 悲剧 ...
The Hobbit 1 1 0 ...
The Great Gatsby 0 0 1 ...
... ... ... ... ...
用 Python 构建推荐引擎

交叉列联表

pd.crosstab(                     ,                       )
用 Python 构建推荐引擎

交叉列联表

pd.crosstab(book_genre_df['Book'], book_genre_df['Genre'])
书籍 冒险 奇幻 悲剧 社会评论
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
... ... ... ... ...
用 Python 构建推荐引擎

Passons à la pratique !

用 Python 构建推荐引擎

Preparing Video For Download...