Ever since I started learning Artificial Intelligence, I wanted to build projects that have real-world applications. So, when I began with supervised learning, I was very curious to know what the dataset for a movie recommendation system would be. That curiosity prompted me to build a prototype of a Movie Recommendation System, the system is built using Django, integrated with serialized trained models, and draws UI inspiration from Amazon Prime Video.
Dataset: https://www.kaggle.com/datasets/shubhammehta21/movie-lens-small-latest-dataset
When building recommendation systems, there are two different approaches:
- Content-Based Filtering
- Collaborative Filtering
Content-based recommendations are provided based on the similarity between the items. For example, in the context of a movie recommendation system, if User-A watches Movie-A, then movies of the same type or movies related to Movie-A will be recommended to User-A.
Collaborative filtering is a recommendation strategy that considers the user’s behavior and compares it with other users in the database. It doesn’t solely depend on one user’s data for modeling. There are various approaches to implement collaborative filtering, but the key concept is the collective influence of multiple users on the recommendation outcome.
Representation of Content-Based Filtering & Collaborative Filtering
In this project, I have implemented Item-Item Collaborative Filtering + Content-Based Filtering
.
For example, when comparing movies 'A' and 'B', we analyze the ratings given by users who rated both movies. If these ratings show high similarity, it indicates that 'A' and 'B' are similar movies. Thus, if someone liked 'A', they should be recommended 'B', and vice versa.
This approach will help us solve the cold start problem when a new user comes in. Also, Content-Based Filtering is provided in parallel to recommend movies on a similar basis by analyzing the cosine similarity.
git clone https://github.com/abdulhakkeempa/movie-recommender.git
cd movie-recommender
- Create a venv and activate it.
- Linux / MacOS
python3 -m venv venv ./venv/bin/activate
- Windows
python3 -m venv venv venv\Scripts\activate
pip install -r requirements.txt
- Copy .env.example as .env and fill in the values.
- Run this command to load movies which are in the dataset from TMDB.
python manage.py load_movies
python manage.py runserver
- Create an account and use the platform.
Go tohttp://localhost:8000/register
python manage.py createsuperuser
python manage.py runserver
- Login with the newly created admin credentials.
Go tohttp://localhost:8000/admin
- https://www.analyticsvidhya.com/blog/2020/11/create-your-own-movie-movie-recommendation-system/#h-removing-noise-from-the-data
- https://towardsdatascience.com/hands-on-content-based-recommender-system-using-python-1d643bf314e4
- https://ieee-dataport.org/open-access/imdb-users-ratings-dataset
- https://datajobs.com/data-science-repo/Recommender-Systems-[Netflix].pdf
This project is licensed under the terms of the GNU General Public License. If you encounter any issues or have suggestions for improvements, please add them to the project's issue tracker. Your contributions are greatly appreciated!