Git Product home page Git Product logo

knn_movie_recommender's Introduction

KNN Movie Recommender

A movie recommender that recommends movies using the K Nearest Neighbours algorithm from a list of ~5000 movies

Requirements

  • Python version: 3.7.4
  • Python modules: pandas, numpy, operator, json, streamlit

Dataset

IMDB 5000 Movie Dataset downloaded from Kaggle

Files

  • Classifier.py is my implementation of the K-Nearest Neighbours algorithm
  • data.py loads the data from the CSV files, cleans it, modifies it into the required format and stores it in JSON files
  • recommender.py is the recommendation engine that runs the KNN algorithm on the data and displays the recommendations
  • data.json and titles.json are JSON files containg the data created in data.py for faster loading when the recommendation engine is run
  • test_movies.py is a file containing sample test data and steps to create new test data

Steps

  • 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 in recommender.py

Streamlit App

  • 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.

Heroku deployment

Further work to be done

  • 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)

knn_movie_recommender's People

Contributors

dependabot[bot] avatar ppai22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.