BaşlayınÜcretsiz Başlayın

Counting up the pairs

You can now create DataFrame of all the permutations of movies that have been watched by the same user. This is of limited use unless you can find which movies are most commonly paired.

In this exercise, you will work with the movie_combinations DataFrame that you created in the last exercise (that has been loaded for you), and generate a new DataFrame containing the counts of occurrences of each of the pairs within.

Bu egzersiz

Building Recommendation Engines in Python

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Calculate how often each item in movies_a occurs with the items in movies_b
combination_counts = movie_combinations.____(['movie_a', 'movie_b']).____()

# Inspect the results
print(combination_counts.head())
Kodu Düzenle ve Çalıştır