Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Recommendation Systems/Recommendation_System.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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])"
Expand Down