Skip to content

jhasiddhant/movie-recommendation-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Content Based Movie Recommendation System

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.

Introduction

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.

Requirements

To run this recommendation system, you will need the following:

Python 3.9.12
Pandas
Numpy
Scikit-learn
NLTK

Datasets

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.

Implementation

The recommendation system is implemented in the mrs.py file. The code performs the following steps:

  1. Load and clean the datasets.

  2. Preprocess the dataset, including removing stopwords, stemming and lemmatizing the words.

  3. Compute the TF-IDF scores for each movie description.

  4. Use Truncated SVD to reduce the dimensionality of the TF-IDF scores.

  5. Calculate the cosine similarity between each pair of movies.

  6. Make recommendations by finding the most similar movies to the movie of interest.

Installation

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.

Example:

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages