NighTurs / discovery-rs

Discovery Recommender System

Home Page:https://nighturs.github.io/discovery-rs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discovery-RS

Discovery-RS is a visualization based recommender system with a goal of providing more information than typical top N recommendations lists can.

Demo: https://nighturs.github.io/discovery-rs/

Demo has static recommendations for music, books and movies. Run recommender server locally to get your own recommendations.

Public datasets involved:

discovery-rs.jpg

Technical details

Project can be viewed as two separate components:

  1. Recommendation model and preparation of visualization data
  2. Web application

First component can be changed to something that provides csv with following requirements (example):

  1. "idx" column, integers from 0 to N without gaps.
  2. "x", "y" columns, float coordinates.
  3. "t_name", title of tooltip.
  4. Any number of "t_" prefixed string columns to be used in search.
  5. Any number of "n_" prefixed float [0, 1] columns to be used for colors and filtering.

And recommender server with api as in rec_server.py. Without server, web application can be used as visualization tool.

Currently first component is a variational autoencoder implicit collaborative filtering model trained with Recoder. T-SNE is run on latent factors to get two dimmentional coordinates. Based on dataset, additional information is attached to each item.

Web application is a static page that uses WebGL (three.js) for smooth visualization of scatter plot with thousands of points. In-memory seach engine is provided by MiniSearch.

Getting recommendations

Run recommendations server locally:

./download-models.sh
cd rec-server
docker-compose up

Now use "Flag" section to get recommendations. Fill in "Name" input and double click items that recommendations will be based on. Then press "Send Flag" to get recommendations. Flags are saved in browser local storage, so they will be preserved.

Alternatively static recommendations can be obtained by modifying rec_items.csv and reproducing demo.

Reproducing demo

Build docker container:

docker build -t discovery-rs .

Then run:

./docker_shell.sh

cd web/data
dvc repro lf_zip gb_zip ml_zip msd_zip

About

Discovery Recommender System

https://nighturs.github.io/discovery-rs/

License:MIT License


Languages

Language:Python 46.4%Language:JavaScript 34.8%Language:HTML 8.9%Language:CSS 6.6%Language:Shell 2.5%Language:Dockerfile 0.9%