{"id":80919,"date":"2021-06-04T12:14:54","date_gmt":"2021-06-04T06:44:54","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=80919"},"modified":"2026-06-03T15:22:20","modified_gmt":"2026-06-03T09:52:20","slug":"movie-recommendation-system-python-machine-learning","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/","title":{"rendered":"Build a Movie Recommendation System in Python using Machine Learning"},"content":{"rendered":"<p>Ever wondered how Netflix or Hotstar recommends new movies based on the watch history, how Amazon or Flipkart suggests new products based on your order or search history?<\/p>\n<p>These suggestions or recommendations are done by a system called a recommendation system. This engine makes suggestions by learning and understanding the patterns in your watch history (let&#8217;s say) and then applies those patterns and findings to make new suggestions.<\/p>\n<h3>About Movie Recommendation Project<\/h3>\n<p>In this machine learning project, we build a recommendation system from the ground up to suggest movies to the user based on his\/her preferences.<\/p>\n<h3>Project Dataset<\/h3>\n<p>There are several datasets available to build a movie recommendation system. But for this project, we are going to use a dataset that contains the metadata (cast, crew, budget, etc..) of the movie.<\/p>\n<p>Please download movie dataset: <a href=\"https:\/\/www.kaggle.com\/tmdb\/tmdb-movie-metadata\"><strong>Movie Recommendation Dataset<\/strong><\/a><\/p>\n<h3>Tools and Libraries used<\/h3>\n<ul>\n<li>Python &#8211; 3.x<\/li>\n<li>Pandas &#8211; 1.2.4<\/li>\n<li>Scikit-learn &#8211; 0.24.1<\/li>\n<\/ul>\n<p>To install the above libraries on your machine, use the following command.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install pandas scikit-learn<\/pre>\n<h3>Download Movie Recommendation System Project Code<\/h3>\n<p>Please download the python source code of movie recommendation system: <a href=\"https:\/\/drive.google.com\/file\/d\/1hDbSCxPWbc-4ReDDcgQ4w_e1NrCL7Hz6\/view?usp=drive_link\"><strong>Movie Recommendation System Project Code<\/strong><\/a><\/p>\n<h3>What is a Recommendation System?<\/h3>\n<p>Before moving on to build a recommender engine for movies, let&#8217;s discuss recommendation systems.<\/p>\n<p><strong>Recommendation systems<\/strong> are computer programs that suggest recommendations to users depending on a variety of criteria.<\/p>\n<p>These systems estimate the most likely product that consumers will buy and that they will be interested in. Netflix, Amazon, and other companies use recommender systems to help their users find the right product or movie for them.<\/p>\n<p>There are 3 types of recommendation systems.<\/p>\n<ol>\n<li><strong> Demographic Filtering:<\/strong>\u00a0The recommendations are the same for every user. They are generalized, not personalized. These types of systems are behind sections like &#8220;Top Trending&#8221;.<\/li>\n<li><strong>Content-based Filtering:<\/strong> These suggest recommendations based on the item metadata (movie, product, song, etc). Here, the main idea is if a user likes an item, then the user will also like items similar to it.<\/li>\n<li><strong>Collaboration-based Filtering:<\/strong> These systems make recommendations by grouping the users with similar interests. For this system, metadata of the item is not required.<\/li>\n<\/ol>\n<p>In this project, we are building a Content-based recommendation engine for movies.<\/p>\n<h3>How to build a Movie Recommendation System using Machine Learning<\/h3>\n<p>The approach to build the movie recommendation engine consists of the following steps.<\/p>\n<ol>\n<li>Perform Exploratory Data Analysis (EDA) on the data<\/li>\n<li>Build the recommendation system<\/li>\n<li>Get recommendations<\/li>\n<\/ol>\n<h4>Step 1: Perform Exploratory Data Analysis (EDA) on the data<\/h4>\n<p>The dataset contains two CSV files, credits, and movies. The credits file contains all the metadata information about the movie and the movie file contains the information like name and id of the movie, budget, languages in the movie that has been released, etc.<\/p>\n<p>Let&#8217;s load the movie dataset using pandas.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import pandas as pd\r\n\r\npath = \".\/Desktop\/TechVidvan\/movie_recommendation\"\r\ncredits_df = pd.read_csv(path + \"\/tmdb_credits.csv\")\r\nmovies_df = pd.read_csv(path + \"\/tmdb_movies.csv\")\r\n<\/pre>\n<p>Let&#8217;s have a peek at our dataframes.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">movies_df.head()<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/movies-df-head.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80927\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/movies-df-head.png\" alt=\"movies df head\" width=\"1400\" height=\"702\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">credits_df.head()\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/credits-df-head.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80928\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/credits-df-head.png\" alt=\"credits df head\" width=\"1400\" height=\"205\" \/><\/a><\/p>\n<p>We only need the id, title, cast, and crew columns of the credits dataframe. Let&#8217;s merge the dataframes into one on the column &#8216;id&#8217;.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">credits_df.columns = ['id','title','cast','crew']\r\n\r\nmovies_df = movies_df.merge(credits_df, on=\"id\")\r\n<\/pre>\n<p>Our new dataframe would be:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">movies_df.head()<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/new-movies-df-head.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80929\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/new-movies-df-head.png\" alt=\"new movies df head\" width=\"1400\" height=\"752\" \/><\/a><\/p>\n<h4>Step 2: Build the Movie Recommender System<\/h4>\n<p>The accuracy of predictions made by the recommendation system can be personalized using the &#8220;plot\/description&#8221; of the movie.<\/p>\n<p>But the quality of suggestions can be further improved using the metadata of movie. Let&#8217;s say the query to our movie recommendation engine is &#8220;The Dark Knight Rises&#8221;. Then the predictions should also include movies directed by the director of the film. It should also include movies with the cast of the given query movie.<\/p>\n<p>For that, we utilize the following features to personalize the recommendation: cast, crew, keywords, genres.<\/p>\n<p>The movie data is present in the form of lists containing strings, we need to convert the data into a safe and usable structure. Let&#8217;s apply the literal_eval() function to the features.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">from ast import literal_eval\r\n\r\nfeatures = [\"cast\", \"crew\", \"keywords\", \"genres\"]\r\n\r\nfor feature in features:\r\n    movies_df[feature] = movies_df[feature].apply(literal_eval)\r\n\r\nmovies_df[features].head(10)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/features-head.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80930\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/features-head.png\" alt=\"features head\" width=\"1400\" height=\"520\" \/><\/a><\/p>\n<p>Let&#8217;s write some functions to extract information like director from the above features.<\/p>\n<p>The get_director() function extracts the name of the director of the movie.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def get_director(x):\r\n    for i in x:\r\n        if i[\"job\"] == \"Director\":\r\n            return i[\"name\"]\r\n    return np.nan\r\n<\/pre>\n<p>The get_list() returns the top 3 elements or the entire list whichever is more.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def get_list(x):\r\n    if isinstance(x, list):\r\n        names = [i[\"name\"] for i in x]\r\n\r\n        if len(names) &gt; 3:\r\n            names = names[:3]\r\n\r\n        return names\r\n\r\n    return []\r\n<\/pre>\n<p>Let&#8217;s apply both the functions get_director() and get_list() to our dataset.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">movies_df[\"director\"] = movies_df[\"crew\"].apply(get_director)\r\n\r\nfeatures = [\"cast\", \"keywords\", \"genres\"]\r\nfor feature in features:\r\n    movies_df[feature] = movies_df[feature].apply(get_list)\r\n<\/pre>\n<p>In the above code, we passed the &#8220;crew&#8221; information to the get_director() function, extracted the name, and created a new column &#8220;director&#8221;.<\/p>\n<p>For the features cast, keyword and genres we extracted the top information by applying the get_list() function<\/p>\n<p>Let&#8217;s see how the data looks like after the above transformations.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">movies_df[['title', 'cast', 'director', 'keywords', 'genres']].head()\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/features-head-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80931\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/features-head-2.png\" alt=\"features head 2\" width=\"1400\" height=\"275\" \/><\/a><\/p>\n<p>The next step would be to convert the above feature instances into lowercase and remove all the spaces between them.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def clean_data(row):\r\n    if isinstance(row, list):\r\n        return [str.lower(i.replace(\" \", \"\")) for i in row]\r\n    else:\r\n        if isinstance(row, str):\r\n            return str.lower(row.replace(\" \", \"\"))\r\n        else:\r\n            return \"\"\r\n\r\nfeatures = ['cast', 'keywords', 'director', 'genres']\r\nfor feature in features:\r\n    movies_df[feature] = movies_df[feature].apply(clean_data)\r\n<\/pre>\n<p>Now, let&#8217;s create a &#8220;soup&#8221; containing all of the metadata information extracted to input into the vectorizer.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def create_soup(features):\r\n    return ' '.join(features['keywords']) + ' ' + ' '.join(features['cast']) + ' ' + features['director'] + ' ' + ' '.join(features['genres'])\r\n\r\n\r\nmovies_df[\"soup\"] = movies_df.apply(create_soup, axis=1)\r\nprint(movies_df[\"soup\"].head())\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/soup-head.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80932\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/soup-head.png\" alt=\"soup head\" width=\"1400\" height=\"139\" \/><\/a><\/p>\n<p>Our movie recommendation engine works by suggesting movies to the user based on the metadata information. The similarity between the movies is calculated and then used to make recommendations. For that, our text data should be preprocessed and converted into a vectorizer using the CountVectorizer. As the name suggests, CountVectorizer counts the frequency of each word and outputs a 2D vector containing frequencies.<\/p>\n<p>We don&#8217;t take into account the words like a, an, the (these are called &#8220;stopwords&#8221;) because these words are usually present in higher amounts in the text and don&#8217;t make any sense.<\/p>\n<p>There exist several similarity score functions such as cosine similarity, Pearson correlation coefficient, etc. Here, we use the cosine similarity score as this is just the dot product of the vector output by the CountVectorizer.<\/p>\n<p>We also reset the indices of our dataframe.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">from sklearn.feature_extraction.text import CountVectorizer\r\nfrom sklearn.metrics.pairwise import cosine_similarity\r\n\r\ncount_vectorizer = CountVectorizer(stop_words=\"english\")\r\ncount_matrix = count_vectorizer.fit_transform(movies_df[\"soup\"])\r\n\r\nprint(count_matrix.shape)\r\n\r\ncosine_sim2 = cosine_similarity(count_matrix, count_matrix) \r\nprint(cosine_sim2.shape)\r\n\r\nmovies_df = movies_df.reset_index()\r\nindices = pd.Series(movies_df.index, index=movies_df['title'])\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/movie-recommendation-cosine-count-matrix.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80933\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/movie-recommendation-cosine-count-matrix.png\" alt=\"movie recommendation cosine count matrix\" width=\"1400\" height=\"238\" \/><\/a><\/p>\n<p>Create a reverse mapping of movie titles to indices. By this, we can easily find the title of the movie based on the index.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">indices = pd.Series(movies_df.index, index=movies_df[\"title\"]).drop_duplicates()\r\n\r\nprint(indices.head())\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/indices-head.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80934\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/indices-head.png\" alt=\"indices head\" width=\"1400\" height=\"183\" \/><\/a><\/p>\n<h4>Step 3: Get recommendations for the movies<\/h4>\n<p>The get_recommendations() function takes the title of the movie and the similarity function as input. It follows the below steps to make recommendations.<\/p>\n<ul>\n<li>Get the index of the movie using the title.<\/li>\n<li>Get the list of similarity scores of the movies concerning all the movies.<\/li>\n<li>Enumerate them (create tuples) with the first element being the index and the second element is the cosine similarity score.<\/li>\n<li>Sort the list of tuples in descending order based on the similarity score.<\/li>\n<li>Get the list of the indices of the top 10 movies from the above sorted list. Exclude the first element because it is the title itself.<\/li>\n<li>Map those indices to their respective titles and return the movies list.<\/li>\n<\/ul>\n<p>Create a function that takes in the movie title and the cosine similarity score as input and outputs the top 10 movies similar to it.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def get_recommendations(title, cosine_sim=cosine_sim):\r\n    idx = indices[title]\r\n    similarity_scores = list(enumerate(cosine_sim[idx]))\r\n    similarity_scores= sorted(similarity_scores, key=lambda x: x[1], reverse=True)\r\n    similarity_scores= sim_scores[1:11]\r\n    # (a, b) where a is id of movie, b is similarity_scores\r\n\r\n    movies_indices = [ind[0] for ind in similarity_scores]\r\n    movies = movies_df[\"title\"].iloc[movies_indices]\r\n    return movies\r\n\r\n\r\nprint(\"################ Content Based System #############\")\r\nprint(\"Recommendations for The Dark Knight Rises\")\r\nprint(get_recommendations(\"The Dark Knight Rises\", cosine_sim2))\r\nprint()\r\nprint(\"Recommendations for Avengers\")\r\nprint(get_recommendations(\"The Avengers\", cosine_sim2))\r\n\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/content-based-filtering-movie-recommendations.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80935\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/content-based-filtering-movie-recommendations.png\" alt=\"content based filtering movie recommendations\" width=\"1400\" height=\"549\" \/><\/a><\/p>\n<p>Here goes our movie recommendation engine.<\/p>\n<h3>Summary<\/h3>\n<p>In this machine learning project, we build movie recommendation systems. We built a content-based recommendation engine that makes recommendations given the title of the movie as input.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever wondered how Netflix or Hotstar recommends new movies based on the watch history, how Amazon or Flipkart suggests new products based on your order or search history? These suggestions or recommendations are done&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":80941,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[210],"tags":[204,3397,3506,3507],"class_list":["post-80919","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning","tag-machine-learning-project","tag-ml-project","tag-movie-recommendation-python","tag-movie-recommendation-system"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Build a Movie Recommendation System in Python using Machine Learning - TechVidvan<\/title>\n<meta name=\"description\" content=\"Create a Movie Recommendation System using Content-based Filtering to recommend new movies based on user liking and watched history\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build a Movie Recommendation System in Python using Machine Learning - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Create a Movie Recommendation System using Content-based Filtering to recommend new movies based on user liking and watched history\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-04T06:44:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-03T09:52:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/machine-learning-project-movie-recommendation-system.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Build a Movie Recommendation System in Python using Machine Learning - TechVidvan","description":"Create a Movie Recommendation System using Content-based Filtering to recommend new movies based on user liking and watched history","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/","og_locale":"en_US","og_type":"article","og_title":"Build a Movie Recommendation System in Python using Machine Learning - TechVidvan","og_description":"Create a Movie Recommendation System using Content-based Filtering to recommend new movies based on user liking and watched history","og_url":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2021-06-04T06:44:54+00:00","article_modified_time":"2026-06-03T09:52:20+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/machine-learning-project-movie-recommendation-system.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Build a Movie Recommendation System in Python using Machine Learning","datePublished":"2021-06-04T06:44:54+00:00","dateModified":"2026-06-03T09:52:20+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/"},"wordCount":1134,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/machine-learning-project-movie-recommendation-system.jpg","keywords":["machine learning project","ML project","movie recommendation python","movie recommendation system"],"articleSection":["Machine Learning Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/","url":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/","name":"Build a Movie Recommendation System in Python using Machine Learning - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/machine-learning-project-movie-recommendation-system.jpg","datePublished":"2021-06-04T06:44:54+00:00","dateModified":"2026-06-03T09:52:20+00:00","description":"Create a Movie Recommendation System using Content-based Filtering to recommend new movies based on user liking and watched history","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/machine-learning-project-movie-recommendation-system.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/machine-learning-project-movie-recommendation-system.jpg","width":1200,"height":628,"caption":"machine learning project movie recommendation system"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/movie-recommendation-system-python-machine-learning\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Build a Movie Recommendation System in Python using Machine Learning"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/80919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=80919"}],"version-history":[{"count":1,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/80919\/revisions"}],"predecessor-version":[{"id":448064,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/80919\/revisions\/448064"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/80941"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=80919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=80919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=80919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}