How to do it...

Now that we have formed a strategy of fetching a variety of products within our recommendation, let's code it up (We'll continue from step 3 of Movie recommendations recipe). The code file is available as Chapter_12_Recommender_systems.ipynb in GitHub.

  1. Extract the embedding values of each movie using Word2Vec.
    1. Create a list of lists of various movies watched by all users:
user_list = movie_count['User2'].unique()user_movies = []for i in range(len(user_list)):     total_user_movies = movie_count[movie_count['User2']==user_list[i]].copy()     total_user_movies.reset_index(inplace=True)     total_user_movies = total_user_movies.drop(['index'],axis=1)     total_user_movies['Movies3'] = total_user_movies['Movies2'].astype(str) user_movies.append(total_user_movies['Movies3'].tolist()) ...

Get Neural Networks with Keras Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.