0% found this document useful (0 votes)
148 views10 pages

Project Report On Movie Recommendation System

Uploaded by

hlenky81
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views10 pages

Project Report On Movie Recommendation System

Uploaded by

hlenky81
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

PM SHRI KENDRIYA VIDYALAYA

OCF AVADI, CHENNAI -54

Project Report on

MOVIE RECOMMENDATION SYSTEM


USING PYTHON
Sub: Artificial Intelligence

Submitted by Submitted to
Name- Ms. VIJITHA M
Class - PGT(CS)

Roll No.-
CERTIFICATE
This is a bonafide record of the project titled “Movie
Recommendation System using Python” done by
………………………………………………………………………..
……………………………………………………………………………
……………………………………………………………………………
……………………during the year 2024-2025 submitted in partial
fulfillment of the requirement for the practical examination for the
AISSE 2024-2025

Signature of Examiner: Signature of Principal

(School Seal)
Acknowledgement
1. Introduction

In today's world, streaming platforms like Netflix, Amazon Prime, and Disney+
offer an overwhelming number of movies and TV shows. It can be challenging for
users to decide what to watch next. A Movie Recommendation System helps
solve this problem by recommending movies based on users' preferences, viewing
history, and similarities with other users. This project aims to build a Movie
Recommendation System using Artificial Intelligence (AI) to enhance user
experience by providing personalized movie suggestions.

2. Objective

The primary objective of this project is to build a movie recommendation system


that uses AI algorithms to suggest movies based on the following:

● User preferences (genres, actors, etc.).

● Historical ratings of movies.

● Similarity with other users' movie choices.

3. AI Project Cycle

The AI Project Cycle is a systematic process that guides the development of AI-
based systems. For the Movie Recommendation System, the cycle will follow
these steps:

1. Problem Definition
2. Data Collection
3. Data Preprocessing
4. Model Selection
5. Model Training
6. Evaluation
7. Deployment

4. Methodology

We will use two key recommendation algorithms:

● Collaborative Filtering (CF): Recommends movies based on what similar


users liked.
● Content-Based Filtering (CBF): Recommends movies based on
similarities in movie attributes (like genre, director, or actors).

5. AI Project Cycle Steps

Step 1: Problem Definition

The problem at hand is to recommend movies to users based on their preferences,


helping them discover new content easily. Our system should be able to:

● Suggest movies similar to what the user has watched.

● Recommend movies that match their interests and preferences.

Step 2: Data Collection

Data is the foundation of any AI model. For this project, movie data can be
collected from sources like:

● MovieLens dataset: A popular dataset containing ratings, genres, and


movie details.
● TMDb API (The Movie Database): Provides detailed movie information,
including title, genres, cast, and ratings.

The dataset should include:


● Movie title

● Genre

● Year of release

● User ratings

● Director and actors

Step 3: Data Preprocessing

Before feeding the data to the AI model, it must be cleaned and transformed to
ensure that the model performs optimally. This involves:

● Removing duplicate entries.

● Handling missing values (e.g., by filling them with the mean or median of
the column).
● Converting categorical features (like genres) into numerical representations
using techniques like one-hot encoding.

Step 4: Model Selection

We will use two main AI models for generating movie recommendations:

1. Collaborative Filtering (CF):


o User-based CF: This method recommends movies based on the
ratings of similar users.
o Item-based CF: This method recommends movies similar to the ones
the user has rated highly.
2. Content-Based Filtering (CBF):
o This method recommends movies based on the similarity in attributes
like genre, actors, and director.
Step 5: Model Training

The next step is to train the model using the data. In the case of Collaborative
Filtering:

● Use the K-Nearest Neighbors (KNN) algorithm to find users or movies


with similar ratings.
● Use cosine similarity or pearson correlation to calculate similarity scores
between users or items.

For Content-Based Filtering, calculate similarity based on movie attributes such as


genre, director, and actors. Use TF-IDF (Term Frequency-Inverse Document
Frequency) or Cosine Similarity to measure how similar two movies are based on
their features.

Step 6: Evaluation

Once the model is trained, evaluate its performance using appropriate metrics:

● Accuracy: The percentage of correct movie recommendations.

● Precision and Recall: Measures the quality of recommendations (whether


the recommendations are relevant to the user).
● Mean Squared Error (MSE): Used to measure how well the system
predicts user ratings.
● F1-Score: A balance between precision and recall.

Step 7: Deployment

Once the model performs well, it is ready for deployment. The recommendation
system can be embedded into a website or an application where users can:

● Input their preferences (e.g., genre, actors).


● Get movie recommendations based on their profile.

● Rate movies and see new suggestions based on their ratings.

6. Tools and Technologies

● Programming Language: Python

● Libraries:

o Pandas: For data manipulation.


o NumPy: For numerical operations.
o Scikit-learn: For machine learning algorithms like KNN and
similarity computation.
o Matplotlib: For visualizing results.
o TensorFlow or PyTorch (optional for deep learning models).
● Dataset: MovieLens dataset, TMDb API

● Platform: Jupyter Notebook for development, Flask or Django for


deployment (if applicable).

7. Source Code

Here is an example of how collaborative filtering can be implemented in Python


using the MovieLens dataset:

python
Copy code
# Import necessary libraries
import pandas as pd
from sklearn.metrics.pairwise import cosine_similarity

# Load dataset
movies = pd.read_csv('movies.csv')
ratings = pd.read_csv('ratings.csv')

# Merge movie data and ratings


movie_data = pd.merge(ratings, movies, on='movieId')

# Create a pivot table where each row is a user, and each column is a movie
movie_pivot = movie_data.pivot_table(index='userId', columns='title',
values='rating')
# Fill missing values with 0
movie_pivot = movie_pivot.fillna(0)

# Calculate cosine similarity between movies


cosine_sim = cosine_similarity(movie_pivot)

# Function to get movie recommendations


def get_movie_recommendations(movie_title):
movie_index = movie_pivot.columns.get_loc(movie_title)
similar_movies = list(enumerate(cosine_sim[movie_index]))
similar_movies = sorted(similar_movies, key=lambda x: x[1],
reverse=True)

recommendations = [movie_pivot.columns[i] for i in


range(len(similar_movies)) if i != movie_index]
return recommendations[:10]

# Get movie recommendations for "The Dark Knight"


recommended_movies = get_movie_recommendations('The Dark Knight')
print("Recommended Movies:")
for movie in recommended_movies:
print(movie)

8. Results

After implementing the recommendation system, the results will show


personalized movie suggestions based on the user’s preferences. For example, if a
user liked "The Dark Knight," the system would recommend movies with similar
themes, genres, or actors.

9. Conclusion

The Movie Recommendation System using AI helps users find movies based on
their interests, making it easier for them to enjoy content without wasting time
browsing. By applying AI techniques like Collaborative Filtering and Content-
Based Filtering, this system ensures that recommendations are personalized and
relevant. This project demonstrates how AI can be used to improve user experience
in entertainment platforms.

10. Future Scope

● Hybrid Approach: Combine both Collaborative and Content-Based


Filtering for better accuracy.
● Deep Learning: Use neural networks for more advanced recommendations.

● Real-Time Recommendations: Implement a system that continuously


updates based on user activity.

11. References

1. MovieLens Dataset (available on Kaggle)


2. The Movie Database (TMDb) API
3. Hands-On Recommendation Systems with Python – by Rounak Banik
4. Scikit-learn documentation

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy