{"id":7852,"date":"2020-04-07T18:10:06","date_gmt":"2020-04-07T12:40:06","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/"},"modified":"2025-02-06T11:12:01","modified_gmt":"2025-02-06T05:42:01","slug":"masterclass-on-movie-recommendation-system","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/","title":{"rendered":"Excerpts From a Masterclass on Movie Recommendation System"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"what-are-recommendation-systems\"><strong>What are Recommendation systems?<\/strong><\/h2>\n\n\n\n<p><span style=\"font-weight: 400\">Recommendation systems are becoming increasingly important in today\u2019s extremely busy world. People are always short on time with the myriad tasks they need to accomplish in the limited 24 hours. Therefore, the recommendation systems are important as they help them make the right choices, without having to expend their cognitive resources.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400\">The purpose of a recommendation system basically is to search for content that would be interesting to an individual. Moreover, it involves a number of factors to create personalised lists of useful and interesting content specific to each user\/individual. Recommendation systems are Artificial Intelligence based algorithms that skim through all possible options and create a customized list of items that are interesting and relevant to an individual. These results are based on their profile, search\/browsing history, what other people with similar traits\/demographics are watching, and how likely are you to watch those movies. This is achieved through <a href=\"https:\/\/www.mygreatlearning.com\/blog\/what-is-predictive-modeling\/\">predictive modeling<\/a> and heuristics with the data available.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"use-cases-of-recommendation-systems\"><b>Use-cases of Recommendation systems<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400\">Recommendations are not a new concept. Even when e-commerce was not that prominent, the sales staff in retail stores recommended items to the customers for the purpose of upselling and cross-selling, and ultimately maximise profit. The aim of recommendation systems is just the same.&nbsp;<\/span><br><span style=\"font-weight: 400\">Another objective of the recommendation system is to achieve customer loyalty by providing relevant content and maximising the time spent by a user on your website or channel. This also helps in increasing customer engagement.&nbsp;<\/span><br><span style=\"font-weight: 400\">On the other hand, ad budgets can be optimized by showcasing products and services only to those who have a propensity to respond to them.&nbsp;<\/span>Check out the <a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/building-recommendation-systems\" target=\"_blank\" rel=\"noreferrer noopener\">recommendation system python<\/a> course and enhance your knowledge of other use cases.<br>Here is a video explaining the kind of recommendation systems used by BigBasket and Netflix:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-recommendation-systems\"><b>Why Recommendation systems?<\/b><\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Live Masterclass on Movie Recommendation System\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/_YE9hF0vJ64?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>- They help the user find items of their interest<br><span style=\"font-weight: 400\">- Helps the item provider to deliver their items to the right user<\/span><br><span style=\"font-weight: 400\">&nbsp; &nbsp; &nbsp; &nbsp;- To identify the most relevant products for each user<\/span><br><span style=\"font-weight: 400\">&nbsp; &nbsp; &nbsp; &nbsp;- Showcase personalised content to each user<\/span><br><span style=\"font-weight: 400\">&nbsp; &nbsp; &nbsp; &nbsp;- Suggest top offers and discounts to the right user<\/span><br><span style=\"font-weight: 400\">- Websites can improve user-engagement<\/span><br><span style=\"font-weight: 400\">- It increases revenues for business through increased consumption<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">If you are new to Machine Learning, read <a href=\"https:\/\/www.mygreatlearning.com\/blog\/what-is-machine-learning\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">\"What is Machine Learning?\"<\/a><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-can-be-recommended\"><b>What can be recommended?<\/b><\/h2>\n\n\n<figure class=\"wp-block-image td-caption-align-https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/application-of-recommendation-systember-infograph.jpg zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/application-of-recommendation-systember-infograph.jpg\"><img decoding=\"async\" width=\"683\" height=\"1024\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/application-of-recommendation-systember-infograph-683x1024.jpg\" alt=\"movie recommendation system - application-of-recommendation-system\" class=\"wp-image-7865\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/application-of-recommendation-systember-infograph-683x1024.jpg 683w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/application-of-recommendation-systember-infograph-200x300.jpg 200w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/application-of-recommendation-systember-infograph-696x1044.jpg 696w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/application-of-recommendation-systember-infograph-280x420.jpg 280w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/application-of-recommendation-systember-infograph.jpg 750w\" sizes=\"(max-width: 683px) 100vw, 683px\" \/><\/figure>\n\n\n\n<p><span style=\"font-weight: 400\">- Advertising Messages<\/span><br><span style=\"font-weight: 400\">- Movies<\/span><br><span style=\"font-weight: 400\">- Books<\/span><br><span style=\"font-weight: 400\">- Music Tracks<\/span><br><span style=\"font-weight: 400\">- News Articles<\/span><br><span style=\"font-weight: 400\">- Restaurants<\/span><br><span style=\"font-weight: 400\">- Future Friends (Social Network Sites)<\/span><br><span style=\"font-weight: 400\">- Courses in e-learning<\/span><br><span style=\"font-weight: 400\">- Jobs<\/span><br>- Research Papers<br><span style=\"font-weight: 400\">- Investment Choices<\/span><br><span style=\"font-weight: 400\">- TV Programs<\/span><br><span style=\"font-weight: 400\">- Citations<\/span><br><span style=\"font-weight: 400\">- Clothes<\/span><br><span style=\"font-weight: 400\">- Online Mates (Dating Services)<\/span><br><span style=\"font-weight: 400\">- Supermarket Goods<br><\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"real-world-examples\"><b>Real-World examples<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400\">Here are some of the examples of the pioneers in creating algorithms for recommendation systems and using them to serve their customers better in a personalized manner. These are:<\/span><br><strong>GroupLens:&nbsp;<\/strong><br><span style=\"font-weight: 400\">- Helped in developing initial recommender systems by pioneering collaborative filtering model&nbsp;<\/span><br><span style=\"font-weight: 400\">- It also provided many data-sets to train models including MovieLens and BookLens<\/span><br><strong>Amazon:<\/strong><br><span style=\"font-weight: 400\">- Implemented commercial recommender systems<\/span><br><span style=\"font-weight: 400\">- They also implemented a lot of computational improvements<\/span><br><strong>Netflix Prize:<\/strong><br><span style=\"font-weight: 400\">- Pioneered Latent Factor\/ Matrix Factorization models<\/span><br><strong>Google-Youtube:<\/strong><br><span style=\"font-weight: 400\">- Hybrid Recommendation Systems<\/span><br><span style=\"font-weight: 400\">- Deep Learning based systems<\/span><br><span style=\"font-weight: 400\">- Social Network Recommendations<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"various-types-of-recommendation-systems\"><b>Various types of recommendation systems<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400\">- Popularity based recommendation systems<\/span><br><span style=\"font-weight: 400\">- Classification model based<\/span><br><span style=\"font-weight: 400\">- Content based recommendations<\/span><br><span style=\"font-weight: 400\">- Nearest neighbour collaborative filtering&nbsp;<\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400\">User-based<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400\">Item-based<\/span><\/li>\n<\/ol>\n\n\n<figure class=\"wp-block-image td-caption-align-https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/types-of-recommendation-systember.jpg zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/types-of-recommendation-systember.jpg\"><img decoding=\"async\" width=\"750\" height=\"875\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/types-of-recommendation-systember.jpg\" alt=\"movie recommendation system - types-of-recommendation-system\" class=\"wp-image-7864\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/types-of-recommendation-systember.jpg 750w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/types-of-recommendation-systember-257x300.jpg 257w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/types-of-recommendation-systember-696x812.jpg 696w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2019\/11\/types-of-recommendation-systember-360x420.jpg 360w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p><span style=\"font-weight: 400\">- Hybrid Approaches<\/span><br><span style=\"font-weight: 400\">- Association rule mining<\/span><br><span style=\"font-weight: 400\">- Deep Learning based recommendation systems<br><\/span><br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"popularity-based-recommendation-system\"><b>Popularity based recommendation system<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400\">Let us take an example of a website that streams movies. The website is in its nascent stage and has listed all the movies for the users to search and watch. What the website misses here is a recommendation system. This results in users browsing through a long list of movies, with no suggestions about what to watch. This, in turn, reduces the propensity of a user to engage with the website and use its services. Therefore, the simplest way to fix this issue is to use a popularity based recommendation system. Top review websites like IMDb and Rotten Tomatoes maintain a database of movies and their popularity in terms of reviews and ratings. Utilising this data to recommend the most popular movies to users based on their star ratings, could increase their content consumption.<\/span><br><span style=\"font-weight: 400\">The popularity-based recommendation system eliminates the need for knowing other factors like user browsing history, user preferences, the star cast of the movie, genre, and other factors. Hence, the single-most factor considered is the star rating to generate a scalable recommendation system. This increases the chances of user engagement as compared to when there was no recommendation system.&nbsp;<\/span><br><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"demerits-of-the-popularity-based-recommendation-system\"><b>Demerits of the popularity based recommendation system<\/b><\/h4>\n\n\n\n<p><span style=\"font-weight: 400\">- Recommendations are not personalized as per user attributes and all users see the same recommendations irrespective of their preferences<\/span><br><span style=\"font-weight: 400\">- Another problem is that the number of reviews (which reflects the number of people who have viewed the movie) will vary for each movie and hence the average star rating will have discrepancies.&nbsp;<\/span><br><span style=\"font-weight: 400\">- The system doesn\u2019t take into account the regional and language preferences and might recommend movies in languages that a regional dialect speaking individual might not understand<\/span><br><span style=\"font-weight: 400\">A popularity based recommendation system when tweaked as per the needs, audience, and business requirement, it becomes a hybrid recommendation system. Additional logic is added to include customization as per the business needs.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-build-a-popularity-based-recommendation-system-in-python\"><b>How to build a popularity based recommendation system in Python?<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400\">For this exercise, we will consider the MovieLens small dataset, and focus on two files, i.e., the movies.csv and ratings.csv.<\/span><br><span style=\"font-weight: 400\">Movies.csv has three fields namely:&nbsp;<\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400\">MovieId - It has a unique id for every movie<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400\">Title - It is the name of the movie<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400\">Genre - The genre of the movie<\/span><\/li>\n<\/ol>\n\n\n\n<p><span style=\"font-weight: 400\">The ratings.csv file has four fields namely:<\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400\">Userid - The unique id for every user who has rated one or multiple movies<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400\">MovieId - The unique id for each movie<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400\">Rating - The rating given to a user to a movie<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400\">Timestamp - When was the rating given to a specific movie<\/span><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>#import all necessary libraries\nimport os\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nplt.style.use('seaborn-bright')\n%matplotlib inline \n#change directory to the folder where data files are present\n#This step is not necessary if the data files and jupyter notebook are in same folder\nos.chdir(r\"C:UsersmirzaDownloadsCompressedml-latest-smallml-latest-small\")\n#import ratings file in a pandas dataframe\nratings_data=pd.read_csv(\"ratings.csv\")\nratings_data.head()<\/code><\/pre>\n\n\n<figure class=\"wp-block-image size-large is-resized zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/6recom.png\"><img decoding=\"async\" width=\"254\" height=\"161\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/6recom.png\" alt=\"\" class=\"wp-image-15667\" style=\"width:280px;height:177px\"><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>movie_names=pd.read_csv(\"movies.csv\")\nmovie_names.head()<\/code><\/pre>\n\n\n<figure class=\"wp-block-image size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/5recom.png\"><img decoding=\"async\" width=\"507\" height=\"164\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/5recom.png\" alt=\"\" class=\"wp-image-15668\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/5recom.png 507w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/5recom-300x97.png 300w\" sizes=\"(max-width: 507px) 100vw, 507px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>movie_data=pd.merge(ratings_data,movie_names,on='movieId')\nmovie_data.head()<\/code><\/pre>\n\n\n<figure class=\"wp-block-image size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/4recom.png\"><img decoding=\"async\" width=\"580\" height=\"165\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/4recom.png\" alt=\"\" class=\"wp-image-15670\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/4recom.png 580w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/4recom-300x85.png 300w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>#create a dataframe for analysis\ntrend=pd.DataFrame(movie_data.groupby('title')&#91;'rating'].mean())\ntrend&#91;'total number of ratings'] = pd.DataFrame(movie_data.groupby('title')&#91;'rating'].count()) \ntrend.head()<\/code><\/pre>\n\n\n<figure class=\"wp-block-image size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/3recom.png\"><img decoding=\"async\" width=\"430\" height=\"184\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/3recom.png\" alt=\"\" class=\"wp-image-15671\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/3recom.png 430w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/3recom-300x128.png 300w\" sizes=\"(max-width: 430px) 100vw, 430px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>#plot rounded-up ratings with number of movies\nplt.figure(figsize =(10, 4))\nax=plt.barh(trend&#91;'rating'].round(),trend&#91;'total number of ratings'],color='b')\nplt.show()<\/code><\/pre>\n\n\n<figure class=\"wp-block-image size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/1recom.png\"><img decoding=\"async\" width=\"585\" height=\"248\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/1recom.png\" alt=\"horizontal plot of data for movie recommendation system\" class=\"wp-image-15672\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/1recom.png 585w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/1recom-300x127.png 300w\" sizes=\"(max-width: 585px) 100vw, 585px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>#a bar graph descibibg number of reviews for first 25 movies\nplt.figure(figsize =(10, 4))\nax=plt.subplot()\nax.bar(trend.head(25).index,trend&#91;'total number of ratings'].head(25),color='b')\nax.set_xticklabels(trend.index,rotation=40,fontsize='12',horizontalalignment=\"right\")\nax.set_title(\"Total Number of reviews for each movie\")\nplt.show()<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Calculate mean rating of all movies and check the popular high rating movies\nmovie_data.groupby('title')&#91;'rating'].mean().sort_values(ascending=False).head()<\/code><\/pre>\n\n\n<figure class=\"wp-block-image size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rcc.png\"><img decoding=\"async\" width=\"591\" height=\"477\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rcc.png\" alt=\"\" class=\"wp-image-15697\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rcc.png 591w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rcc-300x242.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rcc-520x420.png 520w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/figure>\n\n\n\n<p><span style=\"font-weight: 400\">The primary key here is the movieId which is common in both data files. This key makes it possible to join both these files.&nbsp;<\/span><br><span style=\"font-weight: 400\">Now, let us have a look at our Python code for popularity based recommendation system.<\/span><br><span style=\"font-weight: 400\"><strong>Step 1:<\/strong> Include the following packages to allow using functions defined under those packages. The cell will include:<\/span><br><span style=\"font-weight: 400\">- Import os<\/span><br><span style=\"font-weight: 400\">- Import numpy as np<\/span><br><span style=\"font-weight: 400\">- Import pandas as pd<br><\/span><br><br><span style=\"font-weight: 400\"><strong><br>Step 2:<\/strong> Change the working directory and replace it with where your dataset is stored<br><\/span><br><br><span style=\"font-weight: 400\"><strong><br>Step 3:<\/strong> Read the ratings file with the below command into the local variable ratings_data. \u2018.head\u2019 shows you the top five records in the data set. Also, you can see that we are using the pandas library in this cell which we had called earlier.<br><\/span><br><br><span style=\"font-weight: 400\"><br>Similarly, read the movies file as below<br><\/span><br><br><span style=\"font-weight: 400\"><strong><br>Step 4:<\/strong> Merge the two data variables, ratings_data, and movie_names together by calling merge function from the pandas library on the column movieId. This gives a new data frame \u2018movie_data\u2019.<\/span><br><span style=\"font-weight: 400\">Print the movie_data head and you can have a look at the format this new variable appears in.<br><\/span><br><br><span style=\"font-weight: 400\"><strong><br>Step 5:<\/strong>&nbsp;Next, plot a horizontal bar graph using the 'barh' function of the matplotlib library to get an overview of data.We roundup the ratings of all the movies and plot a bar graph of the number of movies against the ratings they got.<br><\/span><br><br><span style=\"font-weight: 400\"><strong><br>Step 6:<\/strong>&nbsp;Next, we plot a bar graph describing the total number of reviews for each movie individually.<\/span><\/p>\n\n\n\n<p><strong>Step 7<\/strong><span style=\"font-weight: 400\">: Finally, we arrange the titles along with their ratings in defending order. This gives us a list of top-rated movies<br><\/span><br><br><span style=\"font-weight: 400\"><br>Now, as mentioned earlier, a large number of users might be reviewing and rating certain movies. While as low as just one user might be rating the other movies. In such cases, some less popular movies can make it to the recommendation list and some of the more popular movies do not make it to the recommendation list. To avoid this bias, one can add a rule to better judge the popularity of a movie.<\/span><br><span style=\"font-weight: 400\">Moreover, newer movies could be more popular than the older ones even though the average ratings might suggest otherwise. In such cases, extra weight could be added to the rating values of the recently released movies to push them up in the recommendation list.&nbsp;<\/span><\/p>\n\n\n<figure class=\"wp-block-image size-full td-caption-align-https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new.png zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new.png\"><img decoding=\"async\" width=\"1500\" height=\"5214\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new.png\" alt=\"movie recommendation system\" class=\"wp-image-11687\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new.png 1500w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new-86x300.png 86w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new-295x1024.png 295w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new-768x2670.png 768w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new-442x1536.png 442w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new-589x2048.png 589w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new-696x2419.png 696w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new-1068x3712.png 1068w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/01\/new-121x420.png 121w\" sizes=\"(max-width: 1500px) 100vw, 1500px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"collaborative-filtering\"><b>Collaborative Filtering&nbsp;<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400\">There are two types of collaborative filtering, namely:<\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400\">User - user collaborative filtering<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400\">Item - item collaborative filtering<\/span><\/li>\n<\/ol>\n\n\n\n<p><span style=\"font-weight: 400\">Let us understand this type of recommendation system with the help of an example. Say there are two users A and B.<\/span><br><span style=\"font-weight: 400\">Now, each of these users watched a number of movies and rated them as below:<\/span><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span style=\"font-weight: 400\">User A<\/span><\/td><td><span style=\"font-weight: 400\">User B<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400\">Movie&nbsp;<\/span><\/td><td><span style=\"font-weight: 400\">Rating<\/span><\/td><td><span style=\"font-weight: 400\">Movie&nbsp;<\/span><\/td><td><span style=\"font-weight: 400\">Rating<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400\">1<\/span><\/td><td><span style=\"font-weight: 400\">-<\/span><\/td><td><span style=\"font-weight: 400\">3<\/span><\/td><td><span style=\"font-weight: 400\">5\/5<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400\">2<\/span><\/td><td><span style=\"font-weight: 400\">-<\/span><\/td><td><span style=\"font-weight: 400\">4<\/span><\/td><td><span style=\"font-weight: 400\">1\/5<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400\">3<\/span><\/td><td><span style=\"font-weight: 400\">5\/5<\/span><\/td><td><span style=\"font-weight: 400\">6<\/span><\/td><td><span style=\"font-weight: 400\">-<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400\">4<\/span><\/td><td><span style=\"font-weight: 400\">1\/5<\/span><\/td><td><span style=\"font-weight: 400\">7<\/span><\/td><td><span style=\"font-weight: 400\">-<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400\">5<\/span><\/td><td><span style=\"font-weight: 400\">-<\/span><\/td><td><span style=\"font-weight: 400\">8<\/span><\/td><td><span style=\"font-weight: 400\">-<\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400\">Here, we can see that both A and B have two movies common and both have rated these movies in a similar manner. Hence, one can assume that both these users emanate similar characteristics and would like to see similar movies as each other.&nbsp;<\/span><br><span style=\"font-weight: 400\">Here, the recommendation system will recommend movies 1, 2, and 5 (if rated high) to user B because user A has watched them. Similarly, movies 6, 7, and 8 (if rated high) will be recommended to user A, (if rated high) because user B has watched them. This is an example of user-user collaborative filtering.&nbsp;<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"measuring-the-similarity-between-users\"><b>Measuring the similarity between users<\/b><\/h4>\n\n\n\n<p><span style=\"font-weight: 400\">One can measure the similarity between two users in different ways. A simple way would be to apply Pearson\u2019s correlation to the common items. If the result is positively and highly correlated then the movies watched and liked by user A can be recommended to user B and vice-versa. On the other hand, if the correlation is negative then there is nothing to be recommended as the two users are not alike.&nbsp;<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"limitations-of-user-user-collaborative-filtering\"><b>Limitations of user-user collaborative filtering&nbsp;<\/b><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400\">A user might be watching a specific niche type of movies that nobody else is watching. Hence there are no similar profiles resulting in no recommendations.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400\">In case of a new movie, there are not enough user ratings to match&nbsp;<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400\">In the case of a new user, there are not many movies that the user has watched or rated. Hence, it is difficult to map these users to similar users.&nbsp;<\/span><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-build-a-user-user-collaborative-filtering-recommendation-system-in-python\"><b>How to build a user-user collaborative filtering recommendation system in Python?<\/b><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#import libraries specific to recommendation system\nfrom surprise import KNNWithMeans\nfrom surprise import Dataset\nfrom surprise import accuracy\nfrom surprise.model_selection import train_test_split\n#load the movielens-100k dataset  UserId :: MovieID :: Rating ::Timestamp\ndata=Dataset.load_builtin('ml-100k')<\/code><\/pre>\n\n\n\n<p>Output:<\/p>\n\n\n<figure class=\"wp-block-image size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc1.png\"><img decoding=\"async\" width=\"762\" height=\"58\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc1.png\" alt=\"\" class=\"wp-image-15693\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc1.png 762w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc1-300x23.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc1-696x53.png 696w\" sizes=\"(max-width: 762px) 100vw, 762px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>#use user based true\/false to switch between user-based or item-based collaborative filters\ntrainset,testset=train_test_split(data,test_size=.15)\nalgo=KNNWithMeans(k=50,sim_options={'name':'pearson_baseline','user_based':True})\nalgo.fit(trainset)<\/code><\/pre>\n\n\n\n<p> Output: <\/p>\n\n\n<figure class=\"wp-block-image size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc2.png\"><img decoding=\"async\" width=\"649\" height=\"81\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc2.png\" alt=\"\" class=\"wp-image-15694\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc2.png 649w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc2-300x37.png 300w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>#We can now query for speicific predictions\nuid=str(196) #raw user id\nlid=str(302) #raw item id\n# get a prediction for specific users and items\npred=algo.predict(uid,lid,verbose=True) <\/code><\/pre>\n\n\n\n<p> Output: <\/p>\n\n\n<figure class=\"wp-block-image size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc3.png\"><img decoding=\"async\" width=\"906\" height=\"41\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc3.png\" alt=\"\" class=\"wp-image-15695\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc3.png 906w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc3-300x14.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc3-768x35.png 768w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc3-696x31.png 696w\" sizes=\"(max-width: 906px) 100vw, 906px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>#run the trained model against the tesset\ntest_pred=algo.test(testset)\ntest_pred<\/code><\/pre>\n\n\n\n<p> Output: <\/p>\n\n\n<figure class=\"wp-block-image size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc4.png\"><img decoding=\"async\" width=\"885\" height=\"296\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc4.png\" alt=\"\" class=\"wp-image-15696\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc4.png 885w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc4-300x100.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc4-768x257.png 768w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/rc4-696x233.png 696w\" sizes=\"(max-width: 885px) 100vw, 885px\" \/><\/figure>\n\n\n\n<p><span style=\"font-weight: 400\">The library function used in order to get user-user collaborative filtering is \u2018K nearest neighbours with means. It is a part of a library \u2018surprise\u2019, which stands for a simple python library for recommendation systems.&nbsp;<\/span><br><span style=\"font-weight: 400\">\u2018Surprise\u2019 also consists of a sub-library called \u2018dataset\u2019 which includes some free datasets available to work on. It eliminates the need for downloading datasets from other sources. Another function that is included here is \u2018train-test-split\u2019. A portion of the data will be utilized for learning what needs to be recommended and another smaller portion to test the performance of the recommendation system.&nbsp;<\/span><br><span style=\"font-weight: 400\">Step 1: The first step is to install and import the surprise package<\/span>. With pip (you\u2019ll need numpy, and a C compiler. Windows users might prefer using conda):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#to install with pip\npip install numpy\npip install scikit-surprise\n#to install with conda\nconda install -c conda-forge scikit-surprise<\/code><\/pre>\n\n\n\n<p><span style=\"font-weight: 400\"><br>Step 2: Load the inbuilt dataset \u2018ml-100k\u2019 and call it data. Split this data into two parts, i.e., 85% for training and 15% for testing.<br><\/span><br><br><span style=\"font-weight: 400\"><br>Step 3: Apply KNNWithMeans as below. Then, fit the algorithm to the training set.<br><\/span><br><br><span style=\"font-weight: 400\"><br>Here the function will display the 50 closest neighbours to a user which have rated the movies in a very similar way as the user being considered. The algorithm identifies these neighbours using \u2018pearson_baseline\u2019. This step accomplishes the training of the model.&nbsp;<\/span><br><span style=\"font-weight: 400\">Moreover, this model can also predict a rating that a user might give to a movie that he or she has not watched yet. Select a specific user id say 196, and a specific movie id say 302, which user 196 has not watched. Now, we can now predict the rating user will give to this movie with the help of the \u2018algo\u2019 defined above.<br><\/span><br><br><span style=\"font-weight: 400\"><br>The model finds the nearest 50 neighbours and selects the ratings provided by these users for the movie 302. The average of these ratings is the predicted rating that the user 196 might give to the movie.&nbsp;<\/span><br><span style=\"font-weight: 400\">Also, the higher predicted rating means that the movie can be recommended to the user and he or she is much likely to click on it and watch.<\/span><br><span style=\"font-weight: 400\">Step 4: Test the model by passing test dataset (\u2018testset\u2019) through the model (\u2018algo\u2019) defined above. This will now predict the rating provided by each user for each movie in the data set.<br><\/span><br><br><span style=\"font-weight: 400\"><br>In case the user or the movie is very new, we do not have many records to predict results. In such cases, the last value in the prediction will appear as <\/span><b>\u2018was_impossible\u2019: True<\/b><span style=\"font-weight: 400\">.<\/span><br><span style=\"font-weight: 400\">Step 5: Finally, measure the performance of the recommendation system by comparing predicted values and original rating values. Here we will calculate the \u2018RMSE\u2019 (root mean squared error) value.<\/span><br><span style=\"font-weight: 400\">In this case, the RMSE value is 0.9313, which one can judge if it is good or bad depending on the size of the dataset.&nbsp;<\/span><br><a rel=\"noopener noreferrer\" href=\"https:\/\/www.youtube.com\/watch?time_continue=5876&amp;v=_YE9hF0vJ64&amp;feature=emb_logo\" target=\"_blank\"><span style=\"font-weight: 400\">Here is the complete masterclass for you on movie recommendation system.<\/span><\/a><span style=\"font-weight: 400\"> Leave in your questions in comments and we would be glad to answer those for you.<\/span><br><span style=\"font-weight: 400\">These are two examples of recommendation systems and their implementation in Python.   <\/span><\/p>\n\n\n\n<p><em>If you wish to learn more about such concepts, you can enroll in <a href=\"https:\/\/www.mygreatlearning.com\/artificial-intelligence\/courses\" target=\"_blank\" rel=\"noreferrer noopener\">AI and Machine Learning Courses<\/a> and upskill today. Learn Artificial Intelligence from the best and gain access to career assistance as well. Upskill today and unlock your dream career. If you have any queries, feel free to leave them in the comments below.   <\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"further-reading\"><strong>Further Reading<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/what-is-machine-learning\/\">What is Machine Learning?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/clustering-algorithms-in-machine-learning\/\">Clustering algorithms<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-spectral-clustering\/\">Introduction to Spectral Clustering<\/a><\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"our-machine-learning-courses\">Our Machine Learning Courses<\/h2>\n\n\n\n<p>Explore our Machine Learning and AI courses, designed for comprehensive learning and skill development.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Program Name<\/strong><\/th><th><strong>Duration<\/strong><\/th><\/tr><tr><th><a href=\"https:\/\/professionalonline2.mit.edu\/no-code-artificial-intelligence-machine-learning-program\">MIT No code AI and Machine Learning Course<\/a><\/th><th>12 Weeks<\/th><\/tr><tr><th><a href=\"https:\/\/idss-gl.mit.edu\/mit-idss-data-science-machine-learning-online-program\">MIT Data Science and Machine Learning Course<\/a><\/th><th>12 Weeks<\/th><\/tr><tr><th><a href=\"https:\/\/www.mygreatlearning.com\/mit-data-science-and-machine-learning-program\">Data Science and Machine Learning Course<\/a><\/th><th>12 Weeks<\/th><\/tr><\/thead><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>What are Recommendation systems? Recommendation systems are becoming increasingly important in today\u2019s extremely busy world. People are always short on time with the myriad tasks they need to accomplish in the limited 24 hours. Therefore, the recommendation systems are important as they help them make the right choices, without having to expend their cognitive resources. [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":13423,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[],"content_type":[],"class_list":["post-7852","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Movie Recommendation System in Machine Learning | Great Learning<\/title>\n<meta name=\"description\" content=\"Movie Recommendation System in Machine Learning: This article explains different types of movie recommendation system with step by step guide to implement it on Python.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Excerpts From a Masterclass on Movie Recommendation System\" \/>\n<meta property=\"og:description\" content=\"Movie Recommendation System in Machine Learning: This article explains different types of movie recommendation system with step by step guide to implement it on Python.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-07T12:40:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-06T05:42:01+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"700\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"Excerpts From a Masterclass on Movie Recommendation System\",\"datePublished\":\"2020-04-07T12:40:06+00:00\",\"dateModified\":\"2025-02-06T05:42:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/\"},\"wordCount\":2360,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Banner-image-resize-1000X700.jpg\",\"articleSection\":[\"AI and Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/\",\"name\":\"Movie Recommendation System in Machine Learning | Great Learning\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Banner-image-resize-1000X700.jpg\",\"datePublished\":\"2020-04-07T12:40:06+00:00\",\"dateModified\":\"2025-02-06T05:42:01+00:00\",\"description\":\"Movie Recommendation System in Machine Learning: This article explains different types of movie recommendation system with step by step guide to implement it on Python.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Banner-image-resize-1000X700.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Banner-image-resize-1000X700.jpg\",\"width\":1000,\"height\":700,\"caption\":\"movie recommendation system\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/masterclass-on-movie-recommendation-system\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI and Machine Learning\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/artificial-intelligence\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Excerpts From a Masterclass on Movie Recommendation System\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Movie Recommendation System in Machine Learning | Great Learning","description":"Movie Recommendation System in Machine Learning: This article explains different types of movie recommendation system with step by step guide to implement it on Python.","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:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/","og_locale":"en_US","og_type":"article","og_title":"Excerpts From a Masterclass on Movie Recommendation System","og_description":"Movie Recommendation System in Machine Learning: This article explains different types of movie recommendation system with step by step guide to implement it on Python.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2020-04-07T12:40:06+00:00","article_modified_time":"2025-02-06T05:42:01+00:00","og_image":[{"width":1000,"height":700,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"Excerpts From a Masterclass on Movie Recommendation System","datePublished":"2020-04-07T12:40:06+00:00","dateModified":"2025-02-06T05:42:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/"},"wordCount":2360,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg","articleSection":["AI and Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/","url":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/","name":"Movie Recommendation System in Machine Learning | Great Learning","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg","datePublished":"2020-04-07T12:40:06+00:00","dateModified":"2025-02-06T05:42:01+00:00","description":"Movie Recommendation System in Machine Learning: This article explains different types of movie recommendation system with step by step guide to implement it on Python.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg","width":1000,"height":700,"caption":"movie recommendation system"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/masterclass-on-movie-recommendation-system\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AI and Machine Learning","item":"https:\/\/www.mygreatlearning.com\/blog\/artificial-intelligence\/"},{"@type":"ListItem","position":3,"name":"Excerpts From a Masterclass on Movie Recommendation System"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg",1000,700,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700-300x210.jpg",300,210,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700-768x538.jpg",768,538,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg",1000,700,false],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg",1000,700,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg",1000,700,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg",640,448,false],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg",96,67,false],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/Banner-image-resize-1000X700.jpg",150,105,false]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":1,"uagb_excerpt":"What are Recommendation systems? Recommendation systems are becoming increasingly important in today\u2019s extremely busy world. People are always short on time with the myriad tasks they need to accomplish in the limited 24 hours. Therefore, the recommendation systems are important as they help them make the right choices, without having to expend their cognitive resources.&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/7852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=7852"}],"version-history":[{"count":40,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/7852\/revisions"}],"predecessor-version":[{"id":104993,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/7852\/revisions\/104993"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/13423"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=7852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=7852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=7852"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=7852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}