Skip to content

(super simple) Anime and Manga Recommendation Systems & Association Rules API

Notifications You must be signed in to change notification settings

vioxcd/animanga-recommenders

Repository files navigation

Anime and Manga Recommendation System

This repository shows a simple deployment of an anime and manga recommendation system model and users' favorites association rules. Deployment is done using FastAPI. It only uses a sample of data (4 records) for demonstration purposes.

The recommendation model is taken from my Bachelor thesis experiment result and demo. The demo is tidy and doesn't include the scraper, cleaning routine, and other tests (skip to the bottom of the notebook to see the recommendation in action!)

The experiments are published as paper and it can be accessed here

The association rules is a project I've done a while back that is related to this one, and I find it interesting so I include it here. The implementation is simple, mostly uses what's already given by Spark's FP-Growth algorithm. The implementation can be found here

Installation

Use the build-docker.sh script to build the image

# execute the script to build the image
chmod +x ./build-docker.sh
./build-docker.sh

# running the image
docker run -d --name CONTAINER_NAME -p 8000:80 animanga-recommenders-fastapi:latest

# either access your browser and go to http://localhost:8000/recs/USER_ID (integer between 0-3) or... (don't forget that last "/" ...)
curl -X GET http://localhost:8000/recs/USER_ID/

Usage

There's 3 endpoint:

  • /recs/USER_ID — used for anime and manga recommendation (matrix factorization)
  • /favs_assoc/USER_ID — used for anime and manga recommendation (association rules)
  • /search_rules/SECTION/?query=QUERY — sections is a value of either [anime, manga, characters, people] and query is the name/title of the section. this endpoint returns the rule for entered query

For trying out, visit http://localhost:8000/docs

Some Pics

The API

Neat docs from FastAPI

It's outputting the same thing as with the Demo CDRS

Get recommendation for users via association rules

Try to search for rules. Penguindrum! It's a great anime

Building the Image and Notes about Docker

It's running smoothly!

I took some notes regarding Docker

Association Rule Recs for Me & Training

Recommendations for me by the association rule model

It's using n=15 and taking so long! (almost 30 miutes) ended up using n=20 which takes seconds...

How favorites looks like in MAL

About

(super simple) Anime and Manga Recommendation Systems & Association Rules API

Topics

Resources

Stars

Watchers

Forks