The Movie Recommender System leverages machine learning and natural language processing to suggest movies similar to a user’s selected movie. Using metadata from movies such as genres, keywords, cast, and crew, it provides recommendations based on similarity. This project is ideal for applications like personalized streaming services and movie discovery platforms.
Try out the Handwritten Digit Recognizer! 👉🏻
Below is a preview of the Movie Recommender System in action. Enter a movie name to see similar movie suggestions! 👇🏻
- Features
- Dataset
- Data Preprocessing
- Model Training
- Installation
- Usage
- Technologies Used
- Results
- Conclusion
- License
- Contact
- Real-time movie recommendations based on a user-selected movie.
- Integrates with The Movie Database (TMDb) API to fetch trending movies and posters.
- Provides an intuitive interface built with Streamlit for an engaging user experience.
- Optimized for fast processing and real-time recommendations, even with large datasets.
- TMDb 5000 Movie Dataset: This dataset contains detailed metadata for 5,000 movies, including information like genres, cast, crew, and keywords. It serves as the primary data source for generating movie recommendations based on content similarity.
- Data Processing: The dataset is transformed into a similarity matrix that compares movies based on their metadata, enabling the system to find and suggest movies similar to the one selected by the user.
- Data Cleaning: Null values are removed, and duplicate entries are handled.
- Feature Extraction: The following features are extracted for each movie:
- Genres
- Keywords
- Cast (top 3 cast members)
- Crew (director only)
- Text Preprocessing: Features are merged into a single "tags" column, with all text converted to lowercase for uniformity.
- Stemming: PorterStemmer is used to reduce words to their root forms, optimizing similarity matching.
- Text Vectorization: A
CountVectorizer
is used to transform text data into vectors, with a maximum of 5,000 features. - Cosine Similarity: Cosine similarity is computed to create a similarity matrix, measuring the closeness of each movie pair.
- Similarity Search: The model retrieves the top 5 most similar movies for the selected title.
movie_list.pkl
: Contains movie data for the recommendation.similarity.pkl
: Stores the cosine similarity matrix for recommendations.
-
Clone the repository:
https://github.com/hk-kumawat/Movie-Recommender-System.git
-
Install dependencies:
pip install -r requirements.txt
-
Run the Streamlit App:
streamlit run app.py
-
Selecting a Movie: Choose a movie from the dropdown menu to view recommendations.
-
Trending Section: The app also displays the top 5 trending movies based on TMDb’s API.
- Programming Language: Python
- Libraries:
pandas
numpy
scikit-learn
streamlit
requests
nltk
(for stemming)
- API: TMDb API for fetching trending movies and movie posters
The Movie Recommender System effectively recommends movies with similar features, with quick response times and a user-friendly interface. The project showcases how machine learning and NLP can be applied to content-based recommendation systems.
The Movie Recommender System showcases how machine learning can enhance user experiences through intelligent recommendations. By utilizing metadata like genres, keywords, cast, and crew, combined with cosine similarity, the system effectively suggests movies similar to a user’s choice. This project exemplifies the potential of recommendation engines in various applications, particularly in content discovery for entertainment platforms.
With room for further enhancements, such as refining the recommendation logic or expanding the dataset, this system provides a solid foundation for personalized, data-driven movie suggestions. It serves as a practical application of machine learning concepts and highlights the role of content-based filtering in building engaging and user-centric platforms.
This project is licensed under the MIT License - see the LICENSE file for details.
I’d love to connect and discuss further:
- 💻 — Explore my projects and contributions.
- 🌐 — Let’s connect professionally.
- 📧 — Send me an email for discussions and queries.
"Because every movie deserves a fan, and every fan deserves the right movie." - Anonymous