Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/9elt/reko
Web API to match similar MyAnimeList users and get anime recommendations
https://github.com/9elt/reko
anime myanimelist
Last synced: about 16 hours ago
JSON representation
Web API to match similar MyAnimeList users and get anime recommendations
- Host: GitHub
- URL: https://github.com/9elt/reko
- Owner: 9elt
- License: mit
- Created: 2022-11-11T22:41:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-09T08:33:58.000Z (5 months ago)
- Last Synced: 2024-08-09T09:35:10.320Z (5 months ago)
- Topics: anime, myanimelist
- Language: Rust
- Homepage: https://reko.moe
- Size: 344 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Reko API](https://reko.moe/)
Reko is a Web API to match similar [***MyAnimeList***](https://myanimelist.net) users and get anime recommendations. Works thanks to [*MyAnimeList API *beta v2**](https://myanimelist.net/apiconfig/references/api/v2).
## Algorithm
Reko matching algorithm is **hash based**, it uses a 64-bit hash with each position representing an anime statistic. The latter are ordered by mal popularity weighted for mean score.
complete reference, example:***`0`** PG-13 rating, **`1`** 12 Episodes series, **`2`** Aired in the 10s, **`3`** Action genre, **. . .** **`63`** RX rating*
The hash is generated from a user list, using the statistics of the last 256 anime he's watched. Each bit is assigned `1` when the corresponding stat has `times watched * scores` greater than the next one.
In few words, the hash roughly stores information on what the user **watches and scores** more than average. Similar users generate similar hashes and vice versa.
### user comparison
Users are compared by computing the [***hamming distance***](https://en.wikipedia.org/wiki/Hamming_distance) on their hashes.
Since genres and themes use most of the hash space (45 bits) the *hamming distance* is computed twice, first on the entire hash, then, with a mask that removes genres and themes bits.
The result is a number between 0 and 83, where 0 is 100% similarity and 83 is 0%.
### anime recommendations
Anime recommendations are taken from other users lists.
Recommendations from the most similar users lists are ordered by the following function:
```
entry scores / (entry count + 1) - floor(avg. years from entry update / 2)
```Recommendations from specific users are ordered by:
```
entry score - floor(years from entry update / 2)
```## Documentation
The Reko API docs are available [**here**](https://reko.moe/docs).