A movie recommender that recommends movies using the K Nearest Neighbours algorithm from a list of ~5000 movies
- Python version: 3.7.4
- Python modules: pandas, numpy, operator, json, streamlit
IMDB 5000 Movie Dataset downloaded from Kaggle
Classifier.py
is my implementation of the K-Nearest Neighbours algorithmdata.py
loads the data from the CSV files, cleans it, modifies it into the required format and stores it in JSON filesrecommender.py
is the recommendation engine that runs the KNN algorithm on the data and displays the recommendationsdata.json
andtitles.json
are JSON files containg the data created indata.py
for faster loading when the recommendation engine is runtest_movies.py
is a file containing sample test data and steps to create new test data
- Just run
recommender.py
to get the recommendations - The movie we are fetching recommendations for is by default set to "Avengers: Infinity War" but it can easily be changed by following the steps in
test_movies.py
- The number of recommendations is by default set to 10. This can be changed by modifying the value of
k
inrecommender.py
- Added an implementation of the recommender in a streamlit app. Can be found at
app.py
- Options to select multiple genres and IMDb score. Also option to select number of movies recommended. Range provided is 5 to 30 movies.
- The app is deployed on Heroku at https://my-movie-recommender-app.herokuapp.com/
- The current implementation would work well for movies not in the dataset. It will also work for movies already in the dataset, but the same movie would also appear among the recommendations. Need to fix this.
- Need to implement the recommender using similarity index instead of KNN and compare results
- Need to work using larger movie datasets such as the MovieLens dataset or the official IMDb dataset
- Find a way to measure how similar the movies are with the current implementation (I would be grateful if someone could help me on this)