From 3bb5e44e099387f7a7ea6d4b0ce833327433d185 Mon Sep 17 00:00:00 2001 From: Abimbola Jeremiah Date: Thu, 14 Nov 2024 11:38:49 +0100 Subject: [PATCH] Update Recommendation_System.ipynb --- Recommendation Systems/Recommendation_System.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Recommendation Systems/Recommendation_System.ipynb b/Recommendation Systems/Recommendation_System.ipynb index fc24a19..a2ac41a 100644 --- a/Recommendation Systems/Recommendation_System.ipynb +++ b/Recommendation Systems/Recommendation_System.ipynb @@ -1051,8 +1051,8 @@ " movs = []\n", " for movidx in np.where(kmeans.labels_ == cluster)[0]:\n", " movid = train_set.idx2movieid[movidx]\n", - " # Check how many ratings this movie has - rat_count = ratings_df.loc[ratings_df['movieId'] == movid].count().iloc[0]\n", + " # Check how many ratings this movie has", + " rat_count = ratings_df.loc[ratings_df['movieId'] == movid].count().iloc[0]\n", " movs.append((movie_names[movid], rat_count))\n", " for mov in sorted(movs, key=lambda tup: tup[1], reverse=True)[:10]:\n", " print(\"\\t\", mov[0])"