Movie Recommendation System

2024 | Machine Learning, Data Science, Streamlit

movie

Overview

Project Link

This movie recommendation system offers personalized suggestions by analyzing user ratings and movie metadata using content-based filtering with a KNN model and cosine similarity. It features secure user authentication with MongoDB and bcrypt encryption, ensuring safe data handling. The interactive Streamlit interface provides a smooth and engaging user experience, while trained models are efficiently stored and loaded using Pickle for real-time performance. All user data and recommendations are securely managed within a MongoDB database.

Challenge

Users often struggle to find movies that match their unique tastes, especially in large streaming libraries. How can we help users quickly discover movies they'll enjoy based on their past preferences and similar content features?

Solution

The Movie Recommendation System tackles the challenge of personalized content discovery through several core innovations:

  • Personalized Content Filtering: Utilizes a content-based filtering approach with K-Nearest Neighbors (KNN) and cosine similarity to suggest movies closely aligned with user preferences.
  • Feature-Weighted Metadata Analysis: Enhances recommendation accuracy by assigning custom weights to genres, directors, and actors—prioritizing the most influential aspects of a movie's profile.
  • Secure User Authentication: Implements user registration and login using MongoDB and bcrypt hashing, ensuring secure and scalable data handling.
  • Interactive Web Interface: Built with Streamlit, the system provides a clean and intuitive UI, allowing users to easily rate movies and view tailored recommendations in real-time.
  • Persistent User Data & Recommendations: Stores user preferences, sessions, and recommendations in a centralized MongoDB database, enabling a seamless personalized experience across sessions.
  • Model Serialization for Performance: Uses Pickle to efficiently save and load trained models, allowing fast and reliable real-time inference without retraining.

Technical Implementation

The Movie Recommendation System is built with a focus on performance and security:

  • Frontend: Streamlit for creating an interactive and dynamic user interface
  • Backend: Python with Streamlit and Flask for handling application logic and routing
  • Data Processing: Pandas and Scikit-learn for feature engineering, data transformation, and model training
  • Storage: MongoDB for storing user profiles, ratings, and personalized recommendations
  • Authentication: bcrypt for secure password hashing and session state management in Streamlit

Project Details

ROLE

Data Scientist

DURATION

2 weeks

TEAM

4 members (Data Scientist, Frontend Developer, Backend Developer)

TECHNOLOGIES

PythonStreamlitScikit-learnPandasNumPyMongoDBbcrypt

OUTCOME

Learnt alot about the importance of data preprocessing and feature engineering in building a recommendation system. More importantly, I learnt about the KNN model and how it can be used to build a recommendation system. I also learnt to intergrate the model with a web application using Streamlit and MongoDB for storing user profiles, ratings, and personalized recommendations.