Skip to content

Instantly share code, notes, and snippets.

@amankharwal

amankharwal/contentbased.py Secret

Created Feb 10, 2021
Embed
What would you like to do?
import numpy as np
import pandas as pd
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import linear_kernel
movies = pd.read_csv('movies_metadata.csv')
print(movies.head())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment