The Regression-based Movie Recommender system that's a hybrid of content-based and collaborative filtering Recommender system. Simply rate some movies and get immediate recommendations tailored for you
- Demo
- Live Applicaiton
- Accompanying Medium articles
- Prerequisites
- Project Structure
- Dataset
- Roadmap
- Roadmap Step Notebooks
- About Hybrid Algorithm
- Usage
- Contributing
- Contact
- License
- References
The following open source packages are used in this project:
- Numpy
- Pandas
- Matplotlib
- Flask
- IMDbPY API
project
│ README.md
│
└───Data
│ │ Data_README.txt
│
└───Images
| | img1.png
| | img1.png
| | ...
|
└───Model
│ │ Exploratory data analysis with PostgreSQL.ipynb
│ │ Hybrid recommendation algorithm.ipynb
│ │ PostgreSQL_Database_wrapper.py
│ │ Movies_Datase.pkl
│ │ Movies_Learned_Features.pkl
│ │
│ └───images
│ │ img1.png
│ │ img2.png
│ │ ...
│
└───Server
│ README.txt
└───templates
│ │ home.html
│ │ layout.html
│ │ result.html
└───app.py
└───Movies_Datase.pkl
└───Movies_Learned_Features.pkl
└───requirements.txt
└───templates
The dataset is provided by GroupLens and can be downloaded from here it contains the following files(links.csv, movies.csv, ratings.csv, and tags.csv)
"This dataset (ml-latest-small) describes 5-star rating and free-text tagging activity from MovieLens, a movie recommendation service. It contains 100836 ratings and 3683 tag applications across 9742 movies. These data were created by 610 users between March 29, 1996, and September 24, 2018. This dataset was generated on September 26, 2018."
- This Dataset of 1 MB is the one used in all Notebooks
- This Dataset of 265 MB is the one used for training deployed model.
- Exploratory Data Analysis(EDA) with PostgreSQ
- Feature engineering
- Model building and training
- Model Evaluation
- Deployment
The hybrid recommendation system consists of the following sequence of steps NOTEBOOK
The main objective of collaborative filtering at this step is to learn features for different movies. The implementation of Collaborative filtering here performs "Feature learning" Using a variation of multivariate regression with gradient descent as an optimization algorithm, it takes as input user-item interaction matrix and simultaneously learns both the parameters for different users and features for different movies
The content-based filtering here again is going to be an extension of multivariate regression but unlike collaborative filtering here I'm going to use the features for movies learned using collaborative filtering now to learn online web-application user parameter using content-based filtering thats unique to the user based on his/her web application movie ratings.
Prediction (uses both the Features for movies learned using collaborative filtering and the Parameters unique to user learned using content-based filtering to recommend top-N recommendation) The prediction uses both the vectors for movies learned using collaborative filtering and the parameter unique to user learned using content-based filtering to recommend top-N recommendation
Setup to run on localhost
- Clone the repository
git clone https://github.com/SyedMuhammadHamza/Hybrid-recommendation-system-web-application.git
cd ~/Hybrid-recommendation-system-web-application
- Create a Python 3.7 environment.
virtualenv .
- Activate Your Virtual Environment for Linux
source bin/activate
- for Windows
cd Scripts
then
activate
- Install dependencies.
pip install -r requirements.txt
- Run following command from the directory you have stored the file
python app.py
Your contributions are always welcome! Contribute by opening an issue or a pull request. Guide for beginners to make their first contribution.
Any questions can be directed to [email protected]
©SyedMuhammadHamza Licensed under MIT License
[1]. H. Zhang, F. Min, D. Ślęzak and B. Shi, "Cost-sensitive regression-based recommender system," 2015 International Conference on Machine Learning and Cybernetics (ICMLC), 2015, pp. 253-258, doi: 10.1109/ICMLC.2015.7340931.
[2]. G. Lekakos and P. Caravelas, "A hybrid approach for movie recommendation", Multimedia tools and applications, vol. 36, no. 1–2, pp. 55-70, 2008.
updting soon
[3]. P. Cremonesi, R. Turrin and F. Airoldi, "Hybrid algorithms for recommending new items", Proceedings of the 2nd International Workshop on Information Heterogeneity and Fusion in Recommender Systems, pp. 33-40, 2011.