Introduktion till innehållsbaserade rekommendationer

Bygga rekommendationsmotorer i Python

Rob O'Callaghan

Director of Data

Vad är innehållsbaserade rekommendationer?

Bild som visar en bok som liknar den användaren gillade och som rekommenderas.

Bygga rekommendationsmotorer i Python

Objekts attribut och egenskaper

Bild av en bok och dess attribut.

Bygga rekommendationsmotorer i Python

Vektorisera dina attribut

OBJEKT Attribut 1 Attribut 2 Attribut 3 Attribut 4
Item_001 0 1 1 0
Item_002 1 0 1 0
Item_003 0 1 0 1
Bygga rekommendationsmotorer i Python

En-till-många-relationer

Bok Genre
The Hobbit Äventyr
The Hobbit Fantasy
The Great Gatsby Tragedi
... ...
Bok Äventyr Fantasy Tragedi ...
The Hobbit 1 1 0 ...
The Great Gatsby 0 0 1 ...
... ... ... ... ...
Bygga rekommendationsmotorer i Python

Korstabulering

pd.crosstab(                     ,                       )
Bygga rekommendationsmotorer i Python

Korstabulering

pd.crosstab(book_genre_df['Book'], book_genre_df['Genre'])
Bok Äventyr Fantasy Tragedi Social kommentar
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
... ... ... ... ...
Bygga rekommendationsmotorer i Python

Nu kör vi en övning!

Bygga rekommendationsmotorer i Python

Preparing Video For Download...