ComeçarComece de graça

Comparing individual movies with Jaccard similarity

In the last lesson, you built a DataFrame of movies, where each column represents a different genre. You can now use this DataFrame to compare movies by measuring the Jaccard similarity between rows. The higher the Jaccard similarity score, the more similar the two items are.

In this exercise, you will compare the movie GoldenEye with the movie Toy Story, and GoldenEye with SkyFall and compare the results.

The DataFrame movie_cross_table containing all the movies as rows and the genres as Boolean columns that you created in the last lesson has been loaded.

Este exercício faz parte do curso

Building Recommendation Engines in Python

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Import numpy and the Jaccard similarity function
import numpy as np
from sklearn.metrics import ____
Editar e executar o código