This repository contains a movie recommendation system built using the TF-IDF and SVD techniques. The system is designed to recommend movies to users based on the similarity between the movies' descriptions, genres, keywords, cast and crew.
A movie recommendation system is a tool that suggests movies to users based on their preferences and interests. This project is a movie recommendation system that recommends movies to users based on the movies which they have already watched.
To run this recommendation system, you will need the following:
Python 3.9.12
Pandas
Numpy
Scikit-learn
NLTK
Source: https://www.kaggle.com/datasets/rounakbanik/the-movies-dataset
The dataset used in this project is composed of three files:
movies_metadata.csv: Contains metadata of movies, including the title, id, overview, and genres.
keywords.csv: Contains keywords for each movie.
credits.csv: Contains information about the cast and crew of each movie.
The recommendation system is implemented in the mrs.py file. The code performs the following steps:
-
Load and clean the datasets.
-
Preprocess the dataset, including removing stopwords, stemming and lemmatizing the words.
-
Compute the TF-IDF scores for each movie description.
-
Use Truncated SVD to reduce the dimensionality of the TF-IDF scores.
-
Calculate the cosine similarity between each pair of movies.
-
Make recommendations by finding the most similar movies to the movie of interest.
Clone this repository to your local machine:
git clone https://github.com/jhasiddhant/movie-recommendation-system.git
Install the required packages:
pip install -r requirements.txt
Run the mrs.py file:
python mrs.py
When prompted, enter the name of a movie to receive recommendations for similar movies.
Enter movie name: The lord of the rings
Recommended Movies:
THE LORD OF THE RINGS: THE TWO TOWERS
THE LORD OF THE RINGS: THE FELLOWSHIP OF THE RING
THE RING THING
THE HUNT FOR GOLLUM
THE LORD OF THE RINGS: THE RETURN OF THE KING
THE RETURN OF THE KING
WOLF
THE HOBBIT: AN UNEXPECTED JOURNEY
THE HOBBIT: THE DESOLATION OF SMAUG
GOR