MOVIE RECOMMENDATION SYSTEM
PROJECT PRESENTATION
Under the guidance of :
Mrs. Jheelam Mondal
(Asst. Professor CSE)
Presented By :
Abhishek Kuila : 00119007
Debabrata Makhal : 00119041
Jayoti Podder : 00119055
Ankit Kumar : 10300120202
Table Of Content
1. Problem Statement
2. Introduction
3. Objective
4. Project Requirements
5. Design & Diagram
6. Coding part
7. Results
8. Conclusion
9. References
Problem Statement
• Aim: To build a movie recommendation system based on
‘Kaggle’ dataset using machine learning.
We wish to integrate the aspects of personalization of user with the overallfeatures
of movie such as genre, popularity etc.
The goal of the project is to recommend a movie to the user on the basis of rating,
genre using cosine similarity
Providing related content out of relevant and irrelevant collection of items to users of
online service providers.
Introduction
• A recommendation system or recommendation engine is a model used for
information filtering where it tries to predict the preferences of a user and
provide suggests based on these preferences.
• Movie Recommendation Systems helps us to search our preferred movies
among all of these different types of movies and hence reduce the trouble of
spending a lot of time searching our favourable movies.
• Recommendation systems have several benefits, the most important being
customer satisfaction and revenue.
Objective
The goal of our project is to develop a movie recommendation system for binge
watchers to help and recommend them good quality of movies.
The Objectives Are :
 Improving the Accuracy of the recommendation system
 Improve the Quality of the movie Recommendation system
 Improving the Scalability.
 Enhancing the user experience.
Project Requirements
Hardware Requirements
• A PC with Windows/Linux OS
• Processor with 1.7-2.4gHz speed
• Minimum of 8gb RAM
• 2gb Graphic card
Software Requirements
• Text Editor (VS-code)
• Streamlit
• Dataset
• Jupyter(Editor)
• Python libraries
Design & Diagram
USER ID
Content Based Filter
Movies
Cosine Similarity Algorithm
Optimal Result
Approach Used
To build recommendation system there are many approach that can be used to build good
recommendation system
Content based recommendation system and collaborative filtering.
Youtube also used content based recommended system, we also used content based recommendation
system in our project and cosine similarity algorithm.
Cosine Similarity
Cosine similarity is used as a metric in different machine learning algorithms like the KNN for
determining the distance between the neighbors, in recommendation systems, it is used to recommend
movies with the same similarities and for textual data, it is used to find the similarity of texts in the
document.
For webhosting we use Streamlit
Streamlit is a promising open-source Python library, which enables developers to build attractive user
interfaces in no time. Streamlit is the easiest way especially for people with no front-end knowledge to put
their code into a web application: No front-end (html, js, css) experience or knowledge is required
C OD IN G PA RT
( M a in.ipynb )
import pandas as pd
movies = pd.read_csv('dataset.csv’) #to read csv file
movies.head(10) #to print all details of 10 movies
movies.describe() #to calculate statiscal data like count, mean,std,
movies.info() #to print all columns and nonull and data types
movies.isnull().sum() #returns the number of missing values in the dataset
movies.columns
movies=movies[['id', 'title', 'overview', 'genre']]
movies
movies['tags'] = movies['overview']+movies['genre’] #it will combine the genre and overview column
movies
new_data = movies.drop(columns=['overview', 'genre'])
new_data
from sklearn.feature_extraction.text import CountVectorizer #method to convert text to numerical data.
cv=CountVectorizer(max_features=10000, stop_words='english')
cv
vector=cv.fit_transform(new_data['tags'].values.astype('U')).toarray()
vector.shape
from sklearn.metrics.pairwise import cosine_similarity
similarity=cosine_similarity(vector)
similarity
new_data[new_data['title']=="The Godfather"].index[0]
distance = sorted(list(enumerate(similarity[2])), reverse=True, key=lambda vector:vector[1])
for i in distance[0:5]:
print(new_data.iloc[i[0]].title)
def recommend(movies):
index=new_data[new_data['title']==movies].index[0]
distance = sorted(list(enumerate(similarity[index])), reverse=True, key=lambda vector:vector[1])
for i in distance[0:5]: #to print only top 5 movies
print(new_data.iloc[i[0]].title)
import pickle
pickle.dump(new_data, open('movies_list.pkl', 'wb'))
pickle.dump(similarity, open('similarity.pkl', 'wb'))
pickle.load(open('movies_list.pkl', 'rb'))
Code For webhosting
import streamlit as st
import pickle
import requests
def fetch_poster(movie_id):
url = "https://api.themoviedb.org/3/movie/{}?api_key=43c2c7148a22f65595a5dcc10a9d6c8b".format(movie_id)
data=requests.get(url)
data=data.json()
poster_path = data['poster_path']
full_path = "https://image.tmdb.org/t/p/w500/"+poster_path
return full_path
movies = pickle.load(open("movies_list.pkl", 'rb'))
similarity = pickle.load(open("similarity.pkl", 'rb'))
movies_list=movies['title'].values
st.header("Movie Recommender System")
import streamlit.components.v1 as components
imageCarouselComponent = components.declare_component("image-carousel-
component", path="frontend/public")
#imageCarouselComponent(imageUrls=imageUrls, height=200)
selectvalue=st.selectbox("Select movie from dropdown", movies_list)
def recommend(movie):
index=movies[movies['title']==movie].index[0]
distance = sorted(list(enumerate(similarity[index])), reverse=True,
key=lambda vector:vector[1])
recommend_movie=[]
recommend_poster=[]
for i in distance[1:6]:
movies_id=movies.iloc[i[0]].id
recommend_movie.append(movies.iloc[i[0]].title)
recommend_poster.append(fetch_poster(movies_id))
return recommend_movie, recommend_poster
if st.button("Show Recommend"):
movie_name, movie_poster = recommend(selectvalue)
col1,col2,col3,col4,col5=st.columns(5)
with col1:
st.text(movie_name[0])
st.image(movie_poster[0])
with col2:
st.text(movie_name[1])
st.image(movie_poster[1])
with col3:
st.text(movie_name[2])
st.image(movie_poster[2])
with col4:
st.text(movie_name[3])
st.image(movie_poster[3])
with col5:
st.text(movie_name[4])
st.image(movie_poster[4])
Snapshots
Sample Video Of Project
Key Benefits
• Provides relevant content to user.
• It saves time and money.
• It increases customer engagement.
• Specially designed for binge watchers
Conclusion
• In this project, to improve the accuracy, quality and scalability of movie
recommendation system.
• A Hybrid approach by unifying content based filtering and collaborative filtering;
using Singular Value Decomposition (SVD) as a classifier.
• The Proposed system will recommends good movies according to user’s choice.
• Bring interests and make users happy.
References
1. Hirdesh Shivhare , Anshul Gupta and Shalki Sharma (2015) ,
IEEE International Conference on Computer, Communication and Control.
2. Manoj Kumar, D.K. Yadav, Ankur Singh and Vijay Kr. Gupta (2015),
“A Movie Recommender System:
MOVREC”, International Journal of Computer
Applications (0975 – 8887) Volume 124 – No.3.
3. Debadrita Roy, Arnab Kundu, (2013),
International Journal of Emerging Technology and Advanced
Engineering, Volume 3, Issue 4.

MOVIE RECOMMENDATION SYSTEM.pptx

  • 1.
    MOVIE RECOMMENDATION SYSTEM PROJECTPRESENTATION Under the guidance of : Mrs. Jheelam Mondal (Asst. Professor CSE) Presented By : Abhishek Kuila : 00119007 Debabrata Makhal : 00119041 Jayoti Podder : 00119055 Ankit Kumar : 10300120202
  • 2.
    Table Of Content 1.Problem Statement 2. Introduction 3. Objective 4. Project Requirements 5. Design & Diagram 6. Coding part 7. Results 8. Conclusion 9. References
  • 3.
    Problem Statement • Aim:To build a movie recommendation system based on ‘Kaggle’ dataset using machine learning. We wish to integrate the aspects of personalization of user with the overallfeatures of movie such as genre, popularity etc. The goal of the project is to recommend a movie to the user on the basis of rating, genre using cosine similarity Providing related content out of relevant and irrelevant collection of items to users of online service providers.
  • 4.
    Introduction • A recommendationsystem or recommendation engine is a model used for information filtering where it tries to predict the preferences of a user and provide suggests based on these preferences. • Movie Recommendation Systems helps us to search our preferred movies among all of these different types of movies and hence reduce the trouble of spending a lot of time searching our favourable movies. • Recommendation systems have several benefits, the most important being customer satisfaction and revenue.
  • 5.
    Objective The goal ofour project is to develop a movie recommendation system for binge watchers to help and recommend them good quality of movies. The Objectives Are :  Improving the Accuracy of the recommendation system  Improve the Quality of the movie Recommendation system  Improving the Scalability.  Enhancing the user experience.
  • 6.
    Project Requirements Hardware Requirements •A PC with Windows/Linux OS • Processor with 1.7-2.4gHz speed • Minimum of 8gb RAM • 2gb Graphic card Software Requirements • Text Editor (VS-code) • Streamlit • Dataset • Jupyter(Editor) • Python libraries
  • 7.
    Design & Diagram USERID Content Based Filter Movies Cosine Similarity Algorithm Optimal Result
  • 8.
    Approach Used To buildrecommendation system there are many approach that can be used to build good recommendation system Content based recommendation system and collaborative filtering. Youtube also used content based recommended system, we also used content based recommendation system in our project and cosine similarity algorithm. Cosine Similarity Cosine similarity is used as a metric in different machine learning algorithms like the KNN for determining the distance between the neighbors, in recommendation systems, it is used to recommend movies with the same similarities and for textual data, it is used to find the similarity of texts in the document. For webhosting we use Streamlit Streamlit is a promising open-source Python library, which enables developers to build attractive user interfaces in no time. Streamlit is the easiest way especially for people with no front-end knowledge to put their code into a web application: No front-end (html, js, css) experience or knowledge is required
  • 9.
    C OD ING PA RT ( M a in.ipynb ) import pandas as pd movies = pd.read_csv('dataset.csv’) #to read csv file movies.head(10) #to print all details of 10 movies movies.describe() #to calculate statiscal data like count, mean,std, movies.info() #to print all columns and nonull and data types movies.isnull().sum() #returns the number of missing values in the dataset movies.columns movies=movies[['id', 'title', 'overview', 'genre']] movies movies['tags'] = movies['overview']+movies['genre’] #it will combine the genre and overview column movies new_data = movies.drop(columns=['overview', 'genre']) new_data
  • 10.
    from sklearn.feature_extraction.text importCountVectorizer #method to convert text to numerical data. cv=CountVectorizer(max_features=10000, stop_words='english') cv vector=cv.fit_transform(new_data['tags'].values.astype('U')).toarray() vector.shape from sklearn.metrics.pairwise import cosine_similarity similarity=cosine_similarity(vector) similarity new_data[new_data['title']=="The Godfather"].index[0] distance = sorted(list(enumerate(similarity[2])), reverse=True, key=lambda vector:vector[1]) for i in distance[0:5]: print(new_data.iloc[i[0]].title)
  • 11.
    def recommend(movies): index=new_data[new_data['title']==movies].index[0] distance =sorted(list(enumerate(similarity[index])), reverse=True, key=lambda vector:vector[1]) for i in distance[0:5]: #to print only top 5 movies print(new_data.iloc[i[0]].title) import pickle pickle.dump(new_data, open('movies_list.pkl', 'wb')) pickle.dump(similarity, open('similarity.pkl', 'wb')) pickle.load(open('movies_list.pkl', 'rb'))
  • 12.
    Code For webhosting importstreamlit as st import pickle import requests def fetch_poster(movie_id): url = "https://api.themoviedb.org/3/movie/{}?api_key=43c2c7148a22f65595a5dcc10a9d6c8b".format(movie_id) data=requests.get(url) data=data.json() poster_path = data['poster_path'] full_path = "https://image.tmdb.org/t/p/w500/"+poster_path return full_path movies = pickle.load(open("movies_list.pkl", 'rb')) similarity = pickle.load(open("similarity.pkl", 'rb')) movies_list=movies['title'].values st.header("Movie Recommender System")
  • 13.
    import streamlit.components.v1 ascomponents imageCarouselComponent = components.declare_component("image-carousel- component", path="frontend/public") #imageCarouselComponent(imageUrls=imageUrls, height=200) selectvalue=st.selectbox("Select movie from dropdown", movies_list) def recommend(movie): index=movies[movies['title']==movie].index[0] distance = sorted(list(enumerate(similarity[index])), reverse=True, key=lambda vector:vector[1]) recommend_movie=[] recommend_poster=[] for i in distance[1:6]: movies_id=movies.iloc[i[0]].id recommend_movie.append(movies.iloc[i[0]].title) recommend_poster.append(fetch_poster(movies_id)) return recommend_movie, recommend_poster if st.button("Show Recommend"): movie_name, movie_poster = recommend(selectvalue) col1,col2,col3,col4,col5=st.columns(5) with col1: st.text(movie_name[0]) st.image(movie_poster[0]) with col2: st.text(movie_name[1]) st.image(movie_poster[1]) with col3: st.text(movie_name[2]) st.image(movie_poster[2]) with col4: st.text(movie_name[3]) st.image(movie_poster[3]) with col5: st.text(movie_name[4]) st.image(movie_poster[4])
  • 14.
  • 15.
  • 16.
    Key Benefits • Providesrelevant content to user. • It saves time and money. • It increases customer engagement. • Specially designed for binge watchers
  • 17.
    Conclusion • In thisproject, to improve the accuracy, quality and scalability of movie recommendation system. • A Hybrid approach by unifying content based filtering and collaborative filtering; using Singular Value Decomposition (SVD) as a classifier. • The Proposed system will recommends good movies according to user’s choice. • Bring interests and make users happy.
  • 18.
    References 1. Hirdesh Shivhare, Anshul Gupta and Shalki Sharma (2015) , IEEE International Conference on Computer, Communication and Control. 2. Manoj Kumar, D.K. Yadav, Ankur Singh and Vijay Kr. Gupta (2015), “A Movie Recommender System: MOVREC”, International Journal of Computer Applications (0975 – 8887) Volume 124 – No.3. 3. Debadrita Roy, Arnab Kundu, (2013), International Journal of Emerging Technology and Advanced Engineering, Volume 3, Issue 4.