Skip to content

Cheukting/django-knn-recommender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

KNN Recommender

By using MovieLens Datasets we build a recommender system based on KNN Item-Based Collaborative Filtering.

Enviroment Setup

Use poetry to set up the Python environment (Python >= 3.9)

Get the full data set from MovieLens Datasets and put the movies.csv and ratings.csv in this repo.

Migrate data into database

Using the Django admin custom management CLI commands:

  • python manage.py load_movies --path <path_to_movies.csv>
  • python manage.py load_ratings --path <path_to_ratings.csv>

Training data

Using the Django admin custom management CLI commands:

  • python manage.py prep_data --path <path_to_static_folder>

Train and produce the hashmap.p, movie_user_mat_sparse.p for deployment. Put in the path you want them to be stored. (e.g. recommender/static/model/)

Run the app

Start the server:

  • python manage.py runserver

App runs in url: http://127.0.0.1:8000/recommender/


Credit to Kevin Laio (KevinLiao159) for original code and blog post

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published