AI Project Shishi
AI Project Shishi
AI Project Shishi
On
RECOMMENDER SYSTEM FOR MOVIES
Submitted to CMREC (UGC Autonomous)
In Partial Fulfillment of the requirements for the Award of Degree of
BACHELOR OF TECHNOLOGY
IN
INFORMATION TECHNOLOGY
Submitted By
KATIKA REDDY SHISHIRA 228R1A1222
Under the guidance of
MRS. G. SWETHA
Assistant Professor, Department of IT
1 DECLARATION 3
2 CERTIFICATE 4
3 ACKNOWLEDGEMENT 5
4 ABSTRACT 6
5 INTRODUCTION 7
6 SAMPLE DATA 8
7 IMPLEMENTATION 9-10
8 OUTPUT 11
9 CONCLUSION 12
2
DECLARATION
This is to certify that the work reported in the project entitled “Recommender System for
Movies” in a record of bonafide work done by OUR TEAM in the Department of Information
Technology, CMR Engineering College.
It is based on our study and/or research and that we have acknowledged all material and sources
used in its preparation, whether they be books, articles, reports, lecture notes, and any other
kind of document, electronic or personal communication.
We also certify that this project has not previously been submitted for assessment in any
academic capacity, and that I have not copied in part or whole or otherwise plagiarized the work
of other persons.
The reports are based on the Project work done entirely by me and not copied from any other
source. I submit my Project for further development by any interested students who share
similar interests to improve the Lead Experiment in the future.
The results embodied in this project have not been submitted to any other University or Institute
for the award of any degree or diploma to the best of our knowledge and belief. We confirm
that we have identified and declared all possible conflicts that we may have.
3
CERTIFICATE
This is to certify that the Project entitled “Recommender System for Movies” is a bonafide work
carried out and submitted by Katika Reddy Shishira 228R1A1222 in partial fulfillment of the
requirement for the award of the degree of BACHELOR OF INFORMATION
TECHNOLOGY(IT) from CMR Engineering College.
The results presented in this Project have been verified and are found to be satisfactory & it is
successfully completed.
4
ACKNOWLEDGEMENT
First of all, we would like to thank the almighty God for listening my prayers and giving me
strength to complete the dissertation work.
We would like to express a deep sense of gratitude and thanks profusely to MRS. G. SWETHA,
Assistant Professor, Department of IT, CMR Engineering College, our guide and mentor,
without the wise counsel and able guidance, it would have been impossible to complete the
dissertation in this manner.
We would like to express my sincere gratitude to our principal DR. A. SRINIVASULA REDDY
and our HOD DR. MADHAVI PINGILI and the College for providing me with facilities
required to do my project and we are also grateful to for cooperation to me for carrying out this
work. We shall be failing in our duty if we don't acknowledge the support received in order to
complete the work.
We must also express my deep regards and thanks to our parents for supporting and boosting
my morale so that we can overcome my hard times. we also want to thank our senior & our
friends.
We finally pray that almighty fulfils the aspirations of all the people who have been a part of
this journey and those who will be a part of future journeys.
5
ABSTRACT
This project involves building a movie recommender system that uses two core techniques:
content-based filtering and collaborative filtering. Recommender systems play a significant role
in delivering personalized suggestions across various platforms, enhancing user engagement by
tailoring content to individual preferences. Content-based filtering makes recommendations by
analyzing movie attributes, such as genres and other features, to identify similar items.
Collaborative filtering, on the other hand, utilizes user rating patterns to suggest movies based
on the preferences of users with similar tastes, forming recommendations from the user-item
matrix. The system is implemented in Python with the help of libraries like Pandas and Scikit-
Learn, which facilitate data processing and similarity computations. By combining these two
approaches, the recommender system provides a balanced mix of content-driven and user-
driven suggestions. This project demonstrates the application of machine learning techniques in
personalized recommendations and provides a framework for further refinement, such as
incorporating hybrid models and real-time updates to improve recommendation accuracy and
responsiveness.
6
INTRODUCTION
Recommender systems have become an essential part of modern-day applications, helping users
discover products, services, and content based on their preferences and past behaviour’s. In the
entertainment industry, particularly in movie streaming platforms, recommender systems play a
crucial role in enhancing user experience by providing personalized content suggestions. This
project focuses on building a movie recommender system using two primary techniques: content-
based filtering and collaborative filtering. Content-based filtering recommends items that are
similar to those a user has shown interest in, based on attributes such as genre, director, or
actors. On the other hand, collaborative filtering predicts a user's preferences by analysing the
ratings and behaviours of similar users, regardless of item attributes. By implementing these
techniques, we aim to provide movie recommendations that align with user interests while
considering both the content's features and user interaction data. The system uses Python, along
with libraries such as Scikit-Learn and Pandas, to process and analyze movie and user rating
data. The goal is to create a versatile recommendation engine that can suggest relevant movies,
improving user engagement and satisfaction. This project not only demonstrates the application
of machine learning techniques in the entertainment industry but also highlights the importance
of personalized recommendations in enhancing the overall user experience.
7
SAMPLE DATA
1. movies.csv
2. ratings.csv
8
IMPLEMENTATION
import pandas as pd
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.feature_extraction.text import CountVectorizer
recommendations = []
for user in sorted_users:
similar_user_id = user[0] + 1
similar_user_ratings = ratings[ratings['userId'] == similar_user_id]
user_watched_movies = ratings[ratings['userId'] == user_id]['movieId'].tolist()
for movie_id in similar_user_ratings['movieId']:
if movie_id not in user_watched_movies:
recommendations.append(movie_id)
if len(recommendations) >= top_n:
break
if len(recommendations) >= top_n:
break
recommended_titles = movies[movies['movieId'].isin(recommendations)]['title'].tolist()
# Content-based example
content_based_recommend('Toy Story (1995)')
# Collaborative-based example
collaborative_recommend(1)
10
OUTPUT
11
CONCLUSION
12