PMBD is the project based on Machine Learning in whcih i have devloped a web application to demonstrate how various Machine Learning algorithms use for recommendation
Website link: https://share.streamlit.io/prashant-smart/recommendation-system/main.py
Demonstrate the use of Recommendation System :
- Helps to Improve the on-site experience by creating dynamic recommendations for different kinds of audiences like Netflix does.
- Helps to categories the product based on their features. Eg: Material, Season, etc.
- Acknowledgement points:-
- This Project is part of Microsoft Engage Program.
- The data fetched is 95% accurate and fetched from the pre available websites such as kaggle.com , movielens.org etc.
- There is no plagirism issue as per design and code, i am sole contributor
- Python
- Streamlit
First of all you need to SIGN UP in the page using ( You can use any username and password for login ):-
Data Preprocessing Code : Data Preprocessing
- Section A: Movie based
- Section B: Person based(cast Member)
- Section C: genres based
In this, a user can select the number of recommendations they want related to a specific movie selected by the movie name.
- Section A.1: Content Based (TF-IDF)
- Section A.2: Content Based (Bag Of Words)
- Section A.3: Item-Item Collaborative Based
- Section A.4: K Nearest Neighbor (Item Based)
This algorithm uses TfidfVectorizer for vector conversion and Cosine Similarity for calculating the angle between two vectors. On the basis of the movie name selected by the user, this algorithm retruns a list of movies sorted in descending order with respect to similarity, which is taken from the similarity matrix (which contains similarity score for each movie).
Code: Content Based Filtering.ipynb
Bag of Words uses the same technique as TF-IDF, but the score is calculated based on the frequency of the most repetitive words in the movie's content, and the similarity score is calculated in the same way as in TF-IDF.
Code: Content Based Filtering.ipynb
In this algorithm, a user rating for a specific movie is calculated on the basis of how other user rate same movie, and by taking some real time rartings, we can show recommendations to users.
Code: Collaborative Item To Ttem Filtering.ipynb
User ratings are predicted here same as in Item-Item Collaborative filtering, but for calculating distance it uses euclidean and manhattan distance between two vectors, and according to that, forms a similarity matrix, then shows recommendations to the user with respect to a specific movie which is selected by the user.
Code: Kth Nearest Neighbor.ipynb
Users can also get recommendations on the basis of a person who has appeared in movies as a lead actor or director.
First, all movies in which that person is cast as an actor or director are sorted in reverse order according to the average rating and if the number of recommendations is greater than that person's movies, then the user gets recommendation on the basis of the first movie which is going to be recommended first to the user.
Code: Cast Based Search.ipynb
This recommendation is based on those movies which have the same genres as selected by the user and then sorted in reverse order according to average ratings of each movie.
Code: Generes Based Search.ipynb
Make a folder in your system and clone the project using git bash then open the project in Visual Studio Code or any IDE you prefer.
git clone https://github.com/prashant-smart/Recommendation-system.git
after cloning the project get into main directory
cd .\Recommendation-system\
3.9.12
or higher ( if you want to download then check out https://www.python.org/downloads/ )
now install all library
pip install -r requirements.txt
To open webapp on your local machine
streamlit run main.py
For better understanding the flow of the website please see Flowchart and Vedio demo.