{"id":20415484,"url":"https://github.com/nomomon/anime-recsys","last_synced_at":"2026-04-18T07:35:26.696Z","repository":{"id":105034540,"uuid":"402045505","full_name":"nomomon/Anime-RecSys","owner":"nomomon","description":":film_strip: Development and comparison of user-item recommendation systems in TensorFlow on an anime dataset.","archived":false,"fork":false,"pushed_at":"2021-09-06T10:23:10.000Z","size":423,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T13:44:32.061Z","etag":null,"topics":["anime","collaborative-filtering","content-based-recommendation","deep-learning","keras","machine-learning","matrix-factorization","neural-network","recommendation-system","recommender-system","recsys","tensorflow","tf-recsys"],"latest_commit_sha":null,"homepage":"https://nomomon.github.io/Anime-RecSys","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nomomon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-01T12:04:02.000Z","updated_at":"2022-11-20T15:39:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e41fe12-7ac0-4b54-94c9-3764a0d14f94","html_url":"https://github.com/nomomon/Anime-RecSys","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomomon%2FAnime-RecSys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomomon%2FAnime-RecSys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomomon%2FAnime-RecSys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomomon%2FAnime-RecSys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nomomon","download_url":"https://codeload.github.com/nomomon/Anime-RecSys/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241960811,"owners_count":20049340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anime","collaborative-filtering","content-based-recommendation","deep-learning","keras","machine-learning","matrix-factorization","neural-network","recommendation-system","recommender-system","recsys","tensorflow","tf-recsys"],"created_at":"2024-11-15T06:16:25.351Z","updated_at":"2026-04-18T07:35:26.690Z","avatar_url":"https://github.com/nomomon.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anime RecSys\n\n![banner](./assets/banner.png)\n\n[![](https://img.shields.io/badge/-Open%20Drive-4285F4?style=flat\u0026logo=Google%20Drive\u0026logoColor=white\u0026labelColor=5c5c5c)](https://drive.google.com/drive/folders/1lUwT4v3Uji4JCMmjU4_qEpBQ2yl8HrYc)\n[![license](https://img.shields.io/github/license/nomomon/Anime-RecSys)](/LICENSE)\n\nDevelopment and comparison of user-item recommendation systems in TensorFlow on an anime dataset.\n\n## What's this about\n\nBuilding recommendation systems using collaborative filtering on the [Anime Recommendation Database 2020](https://www.kaggle.com/hernan4444/anime-recommendation-database-2020) from Kaggle. All models can be downloaded from the Drive.\n\nThere are two common ways of recommending:\n- **Collaborative filtering** — predictions based on collected preferences from many users.\n- **Content-based filtering** — predictions based on item descriptions and user profiles.\n\nRight now we focus only on collaborative filtering.\n\n### Results\n\n**Rating prediction:**\n\n| Model | val_loss | RMSE |\n|---|---|---|\n| Hybrid NN | 1.9694 | 1.4034 |\n| Neural Network | 1.9897 | 1.4105 |\n| Matrix Factorization | 2.8429 | 1.6861 |\n\n**Interaction prediction:**\n\n| Model | val_loss | Acc | Precision | Recall |\n|---|---|---|---|---|\n| Hybrid NN | 0.3079 | 0.8790 | 0.8931 | 0.9759 |\n| Neural Network | 0.2502 | 0.8050 | 0.8907 | 0.8282 |\n| Matrix Factorization | 0.4691 | 0.7678 | 0.8969 | 0.7621 |\n\nThe hybrid model wins on most metrics — multi-task learning helps.\n\n## How to launch\n\nOpen notebooks in Jupyter or Google Colab:\n\n```bash\njupyter notebook User_Anime_Rating_Predictions.ipynb\n```\n\nPre-trained models available on [Google Drive](https://drive.google.com/drive/folders/1lUwT4v3Uji4JCMmjU4_qEpBQ2yl8HrYc).\n\n## Predicting User-Anime Ratings\n\n[![](https://img.shields.io/badge/-Open%20in%20GitHub-157aba?style=flat\u0026logo=GitHub\u0026logoColor=white\u0026labelColor=5c5c5c)](/User_Anime_Rating_Predictions.ipynb)\n[![Open In Collab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/nomomon/anime-recommendations/blob/master/User_Anime_Rating_Predictions.ipynb)\n\nOne way to recommend items is by predicting _what rating a user will give_, then showing the highest-rated unseen items.\n\n### Matrix Factorization\n\nDecompose the user-item interaction matrix into two lower-dimensional matrices. We never actually create the full rating matrix — instead we use embeddings.\n\n\u003cp align=\"center\"\u003e\n \u003cimg width=\"500\" src=\"images/matrix factorization.png\" /\u003e\n\u003c/p\u003e\n\n### Neural Network\n\nConcatenate user and item embeddings, pass through dense layers. Last layer outputs the predicted rating.\n\n\u003cp align=\"center\"\u003e\n \u003cimg height=\"300\" src=\"images/neural network.png\" /\u003e\n\u003c/p\u003e\n\n## Predicting User-Anime Interactions\n\n[![](https://img.shields.io/badge/-Open%20in%20GitHub-157aba?style=flat\u0026logo=GitHub\u0026logoColor=white\u0026labelColor=5c5c5c)](/User_Anime_Interactions_Predictions.ipynb)\n[![Open In Collab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/nomomon/anime-recommendations/blob/master/User_Anime_Interactions_Predictions.ipynb)\n\nInstead of predicting ratings, we can ask: _will the user have a positive interaction with this anime?_\n\nPositive = completed + rated above 5. Negative = dropped or rated 5 or below. Same model structures, but with sigmoid on the output.\n\n## Hybrid (Multi-task)\n\n[![](https://img.shields.io/badge/-Open%20in%20GitHub-157aba?style=flat\u0026logo=GitHub\u0026logoColor=white\u0026labelColor=5c5c5c)](/User_Anime_Hybrid_Predictions.ipynb)\n[![Open In Collab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/nomomon/anime-recommendations/blob/master/User_Anime_Hybrid_Predictions.ipynb)\n\nA model that handles both tasks — predicting ratings and interactions — using shared embeddings. The loss is a weighted sum of both task losses.\n\n\u003cp align=\"center\"\u003e\n \u003cimg height=\"300\" src=\"images/hybrid neural network.png\" /\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomomon%2Fanime-recsys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnomomon%2Fanime-recsys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomomon%2Fanime-recsys/lists"}