You can see the website at work on https://stormy-lake-61586.herokuapp.com .
In order to run the application locally you need to have Docker installed on your local system.Type
docker --version
If you get Docker version 18.09.1, build 4c52b90 ,then Docker is installed otherwise go to this link to install Docker Desktop After Downloading,copy the below given instructions to run the application locally.
$git clone https://github.com/avinsit123/Precog_Intern_Assignment.git
$cd Precog_Intern_Assignment
$docker build -t movie_recco .
$docker run -d -p 5000:5000 movie_recco
Open http://0.0.0.0:5000/ to start the web application and start using it.
I have intended to examine Movie recommender systems through different methods mainly User-User Collaborative Filtering,Item-Item Collaborative Filtering and Rank Matrix factorization.In order for these algorithms to work there needs to be previous users and movies already.I have taken the first 46 users as reference and have stored the movies having movied<=300 in the database.These movies and users belong to the MovieLens Dataset.We build a rating corresponding to these entries by using the Ratings.csv file where all these ratings are mentioned.The Ratings entered by the user are pasted onto the 47th Column of the Matrix(as he is 47th user) and all 3 methods mentioned above are conducted on the rating matrix.
The movies database consists of 300 movies.We take ratings of 12 movies from the user(roughly 5%) and use these ratings to predict ratings of the movies.The top 12 movies having the highest ratings are displayed to the user.
Choosing the number of movies to be displayed invloves a tradeoff between server loading time and accuracy of dataset.Lower amount of movies displayed means a sparse rating matrix but a faster loading time.A large number of movies means denser matric,greater accuracy but larger server loading time(As it needs to make connection with MongoDB Atlas Cluster and read data from it).After testing out optimal values,I arrived on the value of 12 movies.
- Numpy,Pandas to help with all the Numerical Calculations and datasets manipulations.
- Pymongo to connect with online Mongo Atlas Cluster and retreive and add information to it.
- WhiteNoise to help web app to serve its own static files and make external deployment on Heroku easy.
- Gunicorn to help with web app deployment and setting up an external web server on Heroku.
.
├── Dockerfile
├── Main
│ ├── Database_connector.py
│ ├── Externals
│ │ └── ratings.csv
│ ├── Reccomending_functions.py
│ ├── __pycache__
│ │ ├── Database_connector.cpython-35.pyc
│ │ ├── Database_connector.cpython-36.pyc
│ │ ├── Reccomending_functions.cpython-35.pyc
│ │ └── Reccomending_functions.cpython-36.pyc
│ ├── bakend.py
│ ├── static
│ │ ├── graeat.js
│ │ └── movie_beauty.css
│ ├── templates
│ │ ├── Display\ Recommendations.html
│ │ └── Display_movies.html
│ └── wsgi.py
├── Procfile
└── requirements.txt
- Helps heroku server in setting up a web dyno and running the application on a web server
- Contains list of all Dependencies needed to run the application
- Contains CSS and JS files needed to render style on the webpage
- Contains HTML files
- The Main Backend python file which helps in routing amongst various webpages.I have used a Flask Backend.
- Contains Ratings.csv which has all the ratings of the dummy users and their ratings.We have taken the first 46 users and first 300 movies.
- This script helps in fetching data from MongoDB database given a list of movies and packaging it in the form of a class and returning this class.
- Contains all the functions for performing rank-matrix factorization,user-user and item-item collaborative filtering
- File to help Docker hub build a Docker Image
- Bootsnip : In order to get a rough Idea on how to design UI for the Website
- University of Minnesota's Course on Recommender Systems
- Flask Tutorials