DSBDA Mini Project
DSBDA Mini Project
Submitted By
Guided by
Prof. Chetan Aher
INDEX
Sr
Title Page No.
No.
1 Problem Statement 4
Objective
2 • Technology used 4
3 Introduction 5
4 Architecture 6-8
5 Code 9
6 Outputs 10
7 Conclusion 11
8 Future Scope 12
PROBLEM STATEMENT:
OBJECTIVE:
The main objective of this recommendation system is to provide users with top-notch movie
suggestions that match their preferences and to ensure the system is user-friendly and easy to
operate. To achieve this goal, the system employs a blend of metadata analysis and historical
user ratings to create personalized movie recommendations.
The system is specifically engineered to reduce the amount of information users need to provide
by employing data analytics to analyze their past ratings and activities. This approach enables the
system to deliver precise movie recommendations without demanding extensive user input.
TECHNOLOGY USED
Frontend:
● HTML
● CSS
● JAVASCRIPT
● FLASK
Requirements:
● Python 3.6.3
● IDE: VS Code
● Anaconda
Introduction:
The movie recommendation system employs statistical techniques and machine learning
algorithms to analyze user data and offer movie recommendations. These algorithms are
often trained using large datasets of movie metadata, user ratings, and other relevant
information, which enables them to identify patterns and similarities between users and
movies.
● What is scikit-learn?
Scikit-learn is built on top of other popular scientific computing libraries such as NumPy,
SciPy, and Matplotlib, and offers a consistent API for using a range of machine learning
models and algorithms. Additionally, it includes many useful features such as cross-
validation, model selection, and pre-processing. Some of the most commonly used machine
learning algorithms that can be implemented using scikit-learn include linear regression,
logistic regression, support vector machines (SVM), k-nearest neighbors (KNN), decision
trees, random forests, and neural networks.
To use scikit-learn, you must first install the SciPy (Scientific Python) stack, which includes
NumPy for base n-dimensional array support, SciPy for fundamental scientific computing
library support, Matplotlib for comprehensive 2D/3D plotting, Python for an enhanced
interactive console, Sympy for symbolic mathematics, and Pandas for data structures and
analysis.
What is a Recommendation System?
❖Data Collection: The first step is to collect user data, including browsing history,
purchase history, ratings, user behavior, and other pertinent information.
❖Feature Extraction: In this step, the system extracts relevant features from the
data, such as genre, actors, or keywords, which can be utilized to identify patterns
and similarities between items.
❖Similarity Calculation: The system computes the similarity between items based on
their features, using various techniques such as cosine similarity or Euclidean
distance.
Collaborative Filtering:
This type of recommendation system relies on user data such as previous ratings,
reviews, and transactions to recommend products or services. Collaborative Filtering
can be implemented in two ways:
ii. Item-Item Collaborative Filtering: This approach involves pairing items or services
with similar ratings and review sentiments and recommending them to users who
have shown interest in similar items or services.
Content-based recommendation systems :
Content-based recommendation systems don't rely on user data to provide
recommendations, but instead use Artificial Intelligence to identify similarities between
product or service descriptions to suggest compatible items. For example, if a user is
watching Spiderman 2, which is an action movie, the system might recommend
Spiderman 3, but not The Avengers, which is also an action movie but not as similar to
Spiderman 2. These systems are often used to improve user experience and increase
sales by suggesting complementary or upgraded products.
These types of recommendation systems are used for upselling and used to improve user
experience and increasing sales of the companies.
def fetch_poster(movie_id):
response = requests.get('https://api.themoviedb.org/3/movie/{}?api_key=964747c0
9d17107c9c42c03777ecd5a7&language=en-US'.format(movie_id))
data = response.json()
return "https://image.tmdb.org/t/p/w500/" + data['poster_path']
def recommend(movie):
movie_index = movies[movies['title'] == movie].index[0]
distances = similarity[movie_index]
movies_list = sorted(list(enumerate(distances)), reverse=True, key=lambda x:
x[1])[1:6]
recommended_movies = []
recommended_movies_posters = []
for i in movies_list:
movie_id = movies.iloc[i[0]].movie_id
recommended_movies.append(movies.iloc[i[0]].title)
recommended_movies_posters.append(fetch_poster(movie_id))
return recommended_movies, recommended_movies_posters
if st.button('Recommend'):
names, posters = recommend(selected_movie_name)
col1, col2, col3, col4, col5 = st.columns(5)
with col1:
st.image(posters[0])
st.info(names[0])
with col2:
st.image(posters[1])
st.info(names[1])
with col3:
st.image(posters[2])
st.info(names[2])
with col4:
st.image(posters[3])
st.info(names[3])
with col5:
st.image(posters[4])
st.info(names[4])
OUTPUT:
Conclusion:
Overall, recommendation systems are crucial in helping viewers navigate the vast
array of available content and discover hidden gems. By utilizing various techniques
such as collaborative filtering, content-based filtering, and hybrid approaches,
recommendation systems can provide personalized and accurate recommendations
to enhance the viewing experience.
Future Scope:
The future of movie recommendation systems looks promising as more and more
people are using these systems to enhance their viewing experience. Here are some
potential future scopes for movie recommendation systems:
2. Utilizing social media data: Movie recommendation systems could integrate social
media data to improve their recommendations. For example, by analyzing a
user's social media activity, these systems could determine what types of movies
or TV shows their friends are interested in and make recommendations based on
that information.