Skip to content

Movie Recommender based on the MovieLens Dataset (ml-100k) using item-item collaborative filtering.

Notifications You must be signed in to change notification settings

abhilampard/Movie_Recommendation_Engine

Repository files navigation

Movie Recommendation Engine

Collaborative Filtering

  • Collaborative Filtering simply put uses the "wisdom of the crowd" to recommend items.
  • Item based collaborative filtering uses the patterns of users who liked the same movie as me to recommend me a movie (users who liked the movie that I like, also liked these other movies).
  • Recommendation based on user's input of any movie present in the dataset.

Files

  • Movie_Recommender_Notebook.ipynb: Jupyter notebook with step-by-step instructions
  • Movie_Recommender_User_Input.py: Python file for allowing user's input of movie

Dataset

The following main data source was used for this project:

How does it work?

Data Pre-processing

  • Dropping columns that are not required
  • Merging dataframes

Pivot Table

Pivot_Table

  • Pivot tables give you the ability to look at data in so many different ways.
  • Pivot table is created as shown in the image with Movies as rows, Users as columns and Ratings as values.

Cosine Similarity

  • Also known as vector-based similarity, this formulation views two items and their ratings as vectors, and defines the similarity between them as the angle between these vectors:

itembased-cosine

Recommender

  • User enters his favourite movie (or the movie on the basis of which he wants the system to recommend movies)
  • Based on the user's input, recommendation is made by sorting the similarities in descending order

References

  • Schafer, J. B., Frankowski, D., Herlocker, J., & Sen, S. (2007). Collaborative filtering recommender systems. In The Adaptive Web (pp. 291-324). Springer Berlin Heidelberg.