Skip to content

Instantly share code, notes, and snippets.


amankharwal/ Secret

Created Feb 10, 2021
What would you like to do?
tfidf = TfidfVectorizer(stop_words='english')
movies['overview'] = movies['overview'].fillna('')
overview_matrix = tfidf.fit_transform(movies['overview'])
similarity_matrix = linear_kernel(overview_matrix,overview_matrix)
mapping = pd.Series(movies.index,index = movies['title'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment