Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nano-bot01/movie-recommender-web-application
Movie Recommendation System based on machine learning concepts
https://github.com/nano-bot01/movie-recommender-web-application
dataset google-colaboratory ipynb ipynb-jupyter-notebook jupyter-notebook machine-learning movie-database movie-recommendation movie-recommendation-system movie-recommendation-web-app movie-recommender movies recommendation-system recommender-system tfidfvectorizer tmdb-api
Last synced: about 1 month ago
JSON representation
Movie Recommendation System based on machine learning concepts
- Host: GitHub
- URL: https://github.com/nano-bot01/movie-recommender-web-application
- Owner: nano-bot01
- License: lgpl-2.1
- Created: 2023-03-26T10:04:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-21T11:55:22.000Z (about 1 year ago)
- Last Synced: 2024-09-27T23:41:00.564Z (about 2 months ago)
- Topics: dataset, google-colaboratory, ipynb, ipynb-jupyter-notebook, jupyter-notebook, machine-learning, movie-database, movie-recommendation, movie-recommendation-system, movie-recommendation-web-app, movie-recommender, movies, recommendation-system, recommender-system, tfidfvectorizer, tmdb-api
- Language: Jupyter Notebook
- Homepage: https://movie-recommender-web-application-system.streamlit.app/
- Size: 2.31 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Movie Recommendation System
Movie Recommendation System based on TfidfVectorizer and cosine similarity function
### Quick Description
This project is a movie recommender system that uses machine learning to recommend movies to users. It uses TfidfVectorizer and cosine similarity to find similar movies. The user inputs their favorite movie and the program recommends five similar movies.
The project is implemented as a web application. The user interface is simple and easy to use. The user simply enters the name of their favorite movie and the program recommends five similar movies. The recommendations are based on the content of the movies, including the plot, characters, and genre.
The project uses a variety of machine learning techniques to recommend movies. The first step is to use TfidfVectorizer to convert the movie descriptions into vectors. TfidfVectorizer is a technique that converts text into vectors by considering the frequency of the words in the text and the importance of the words.
Once the movie descriptions have been converted into vectors, the project uses cosine similarity to find similar movies. Cosine similarity is a measure of the similarity between two vectors. The higher the cosine similarity between two vectors, the more similar the two vectors are.
The project uses the cosine similarity between the movie vectors to recommend movies to users. For each user, the project finds the five movies with the highest cosine similarity to the user's favorite movie. These five movies are then recommended to the user.
### Cosine Similarity :
Cosine similarity is a measure used to determine the similarity between two vectors in a high-dimensional space. It calculates the cosine of the angle between the two vectors and returns a value between -1 and 1.![image](https://user-images.githubusercontent.com/78251168/227769415-0367c033-f3fe-4b32-bf5d-36d05879e3fc.png)
In simpler terms, imagine two vectors as arrows pointing in a particular direction. The angle between these arrows can be used to measure their similarity. If the arrows are pointing in the same direction, then the angle between them is 0 and the cosine similarity is 1. If the arrows are perpendicular, the cosine similarity is 0, and if the arrows are pointing in opposite directions, the cosine similarity is -1.
Cosine similarity is commonly used in information retrieval and text mining to compare the similarity of documents or text snippets based on the frequency of words. It is also used in recommendation systems to find similar items or products.
### TfidfVectorizer *"Term Frequency-Inverse Document Frequency Vectorizer"* :
TfidfVectorizer is a popular method used for text analysis and is often used in natural language processing (NLP). It stands for "Term Frequency-Inverse Document Frequency Vectorizer".In simpler terms, TfidfVectorizer is a tool that converts a collection of documents into a matrix of features that can be used to analyze the text. It takes into account the frequency of each word in a document and in the entire corpus (collection of documents) to determine the importance of each word.
The "term frequency" refers to the number of times a word appears in a particular document. The "inverse document frequency" measures how important a word is across all the documents in the corpus. Words that are common across all documents will have a lower IDF value, while words that are unique to a particular document will have a higher IDF value.
TfidfVectorizer creates a sparse matrix representation of the text, which can be used for further analysis, such as clustering, classification, and information retrieval. It is commonly used in applications such as search engines, content recommendation systems, and sentiment analysis.
![Screenshot 2023-07-24 123420](https://github.com/nano-bot01/Movie-Recommender-Web-Application/assets/78251168/e86a4319-c187-45d3-bb3e-fbde6b622357)
## Recommendation function
```
def recommend(name):
find_close_match = difflib.get_close_matches(movie_name, list_of_all_titles)
try:
close_match = find_close_match[0]
except IndexError:
close_match = 'null'
print("No result found with this title")
return
index_of_movie = dataset[dataset.title == close_match]['index'].values[0]
score = list(enumerate(similarity[index_of_movie]))
sorted_list = sorted(score, key = lambda x:x[1], reverse = True)print("Movies Results : \n")
i = 1
for movie in sorted_list:
index = movie[0]
title_of_movie = dataset[dataset.index == index]['title'].values[0]
if(i<=5):
print(i, '. ', title_of_movie)
i += 1
``````
movie_name = input('Enter your favourite movie name : ')recommend(movie_name)
```### Collaborated by : [Ankit Nainwal](https://github.com/nano-bot01)
### Please ⭐⭐⭐⭐