Go to the profile of  Paras Patidar
Paras Patidar
I am working on Machine Learning, Python and Django.
2 min read

Building a Movie Recommendation Engine Using Python

Recommendation engines are the program that compute the similarity between the two entities and on that basis, it give us the targeted output.

Building a Movie Recommendation Engine Using Python

Recommendation engines are the program that compute the similarity between the two entities and on that basis, it give us the targeted output. If we look the base of the recommendation engine, they all are trying to find out the amount of similarity between the two entities. Then, the computed similarities can be used to deduce various kinds of recommendations and relationships between them.

Recommendation are based on the following techniques:

  1. Popularity Based Filtering
  2. Collaborative Filtering (User Based / Item Based).
  3. Hybrid User-Item  Based Collaborative Filtering.
  4. Content Based Filtering

Popularity Based Filtering

The most basic form of recommendation engine would be where the engine recommends the most popular items to all the users. That would be generalized as everyone would be getting similar recommendation engines as we didn't personalize the recommendations. These kinds of recommendation engines are based on the Popularity Based Filtering. The use case for this model would be the "Top News" Section for the day on a news website where the most popular new for everyone is same irrespective of the interests of every user because that makes a logical sense because News is generalised thing and it has nothing to do with user's interest's.

Collaborative Filtering

Here, two entities collaborate to deduce recommendations on the basis of certain similarities between them. Collaborative filtering techniques are broadly of two types :

  1. User Based Collaborative Filtering : In user based collaborative filtering, we find out the similarity score between the two users. On the basis of similarity score, we recommend the items bought/ liked by one user to other user assuming that he might like these items on the basis of similarity. This will be more clear when we go ahead and implement this. Major online streaming service, Netflix have their recommendation engine based on user based collaborative filtering.
  2. Item Based Collaborative Filtering : In item based collaborative filtering, the similarity of an item is calculated with the existing item being consumed by the existing users. Then on the basis of amount of similarity, we can say that if User1 likes item A and a new item P is most similar to item A then it highly makes sense for us to recommend item P to User1.

Hybrid User-Item Based Collaborative Filtering

This technique is basically a mixture of both the above techniques where in the recommendations are not solely based on either. Amazon uses this technique to recommend item(s) to their customer.

Content Based Filtering

In this technique, the users are recommended the similar content which they have used/watched/liked the most before. For example, if a user has been mostly listening to songs of similar type (bit rate, bps, tunes etc.), he will be recommended the songs falling under the same category decided based on certain features. The best example of this category would be Pandora Radio which is a music streaming and automated music recommendation internet radio service.

Coding and Implementation

The Jupyter Notebook is available in my github repository.  

Github repo here : Github