Créer des moteurs de recommandation en Python
Rob O'Callaghan
Director of Data


| ÉLÉMENT | 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 |
| Livre | Genre |
|---|---|
| The Hobbit | Aventure |
| The Hobbit | Fantastique |
| The Great Gatsby | Tragédie |
| ... | ... |
| Livre | Aventure | Fantastique | Tragédie | ... |
|---|---|---|---|---|
| The Hobbit | 1 | 1 | 0 | ... |
| The Great Gatsby | 0 | 0 | 1 | ... |
| ... | ... | ... | ... | ... |
pd.crosstab( , )
pd.crosstab(book_genre_df['Book'], book_genre_df['Genre'])
| Livre | Aventure | Fantastique | Tragédie | Commentaire social |
|---|---|---|---|---|
| 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 |
| ... | ... | ... | ... | ... |
Créer des moteurs de recommandation en Python