Construindo mecanismos de recomendação em Python
Rob O'Callaghan
Director of Data


| ITEM | Atributo 1 | Atributo 2 | Atributo 3 | Atributo 4 |
|---|---|---|---|---|
| Item_001 | 0 | 1 | 1 | 0 |
| Item_002 | 1 | 0 | 1 | 0 |
| Item_003 | 0 | 1 | 0 | 1 |
| Livro | Gênero |
|---|---|
| The Hobbit | Aventura |
| The Hobbit | Fantasia |
| The Great Gatsby | Tragédia |
| ... | ... |
| Livro | Aventura | Fantasia | Tragédia | ... |
|---|---|---|---|---|
| The Hobbit | 1 | 1 | 0 | ... |
| The Great Gatsby | 0 | 0 | 1 | ... |
| ... | ... | ... | ... | ... |
pd.crosstab( , )
pd.crosstab(book_genre_df['Book'], book_genre_df['Genre'])
| Livro | Aventura | Fantasia | Tragédia | 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 |
| ... | ... | ... | ... | ... |
Construindo mecanismos de recomendação em Python