{"id":25999778,"url":"https://github.com/Embraccce/RecStudy","last_synced_at":"2025-03-05T18:41:34.992Z","repository":{"id":259817708,"uuid":"879488611","full_name":"Embraccce/RecStudy","owner":"Embraccce","description":"记录推荐系统的学习","archived":false,"fork":false,"pushed_at":"2024-12-05T08:58:54.000Z","size":4421,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-05T09:34:58.999Z","etag":null,"topics":["recommendation-system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Embraccce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-28T02:13:51.000Z","updated_at":"2024-12-05T08:58:57.000Z","dependencies_parsed_at":"2024-11-26T14:38:19.610Z","dependency_job_id":null,"html_url":"https://github.com/Embraccce/RecStudy","commit_stats":null,"previous_names":["embraccce/recstudy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Embraccce%2FRecStudy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Embraccce%2FRecStudy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Embraccce%2FRecStudy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Embraccce%2FRecStudy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Embraccce","download_url":"https://codeload.github.com/Embraccce/RecStudy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242083049,"owners_count":20069229,"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":["recommendation-system"],"created_at":"2025-03-05T18:40:47.060Z","updated_at":"2025-03-05T18:41:34.987Z","avatar_url":"https://github.com/Embraccce.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"------\n# RecStudy: A Comprehensive Study of Recommender Systems\n\nWelcome to **RecStudy**, an introductory journey for beginners in recommender systems. This project covers various techniques, from basic collaborative filtering to deep learning algorithms and advanced graph-based and knowledge graph methods.\n\nThe primary reference for this project is Professor Yu Fangren's book, [*\"Hands-on Learning of Recommender Systems: Algorithm Implementation Based on PyTorch\"*](https://book.douban.com/subject/36160038/). A significant portion of the code is inspired by the content of the book and the  [**author's code repository**](https://github.com/rexrex9/). Special thanks to Professor Yu Fangren for his invaluable contributions!\n\nTo facilitate learning for beginners, all code is thoroughly commented, well-organized, and ready to run without any adjustments. You can directly execute the code and see the final results. If you encounter any issues, feel free to raise them in the Issues section!\n\nBelow is the directory structure and a detailed description of each chapter.\n\n------\n\n## Project Structure\n\n```plaintext\nRecStudy/\n├─ dataset/                        # Datasets used in the project\n│  ├─ ml-100k                      # MovieLens 100K dataset\n│  ├─ ml-100k-original             # Original MovieLens 100K dataset\n│  └─ ml-latest-small              # MovieLens Latest Small dataset\n├─ Part1.BasicRecAlgorithms/       # Basic recommender system algorithms\n├─ Part2.AdvancedRecAlgorithms/    # Advanced deep learning-based algorithms\n├─ Part3.GraphRecAlgorithms/       # Graph-based recommender algorithms\n├─ Part4.KGRecAlgorithms/          # Knowledge graph recommender algorithms\n├─ Part5.ConstructRecSys/          # Recommender system construction techniques\n├─ Part6.EvaRecSys/                # Evaluation methods for recommender systems\n└─ utils/                          # Utility scripts\n```\n\n------\n\n## Chapters Overview\n\n### **Part 1: Basic Recommender Systems**\n\nThis chapter introduces foundational algorithms and techniques for recommender systems, including matrix factorization, collaborative filtering, and similarity-based methods.\n\n| File                                                         | Description                                                  |\n| :----------------------------------------------------------- | ------------------------------------------------------------ |\n| [`ALS_PyTorch.py`](Part1.BasicRecAlgorithms/ALS_PyTorch.py)  | Alternating Least Squares (ALS) implemented in PyTorch.      |\n| [`ALS_tradition.py`](Part1.BasicRecAlgorithms/ALS_tradition.py) | ALS implemented in NumPy.                                    |\n| [`basicSim.py`](Part1.BasicRecAlgorithms/basicSim.py)        | Basic similarity computation for user-item pairs.            |\n| [`evaluate.py`](Part1.BasicRecAlgorithms/evaluate.py)        | Evaluation metrics for recommender systems.                  |\n| [`FM.py`](Part1.BasicRecAlgorithms/FM.py)                    | Factorization Machines (FM) implementation.                  |\n| [`FM_embbeding_style.py`](Part1.BasicRecAlgorithms/FM_embbeding_style.py) | FM with embedding style implementation.                      |\n| [`furtherSim.py`](Part1.BasicRecAlgorithms/furtherSim.py)    | Extensions of similarity computation.                        |\n| [`itemCF_01label.py`](Part1.BasicRecAlgorithms/itemCF_01label.py) | Item-based collaborative filtering with binary labels.       |\n| [`LR.py`](Part1.BasicRecAlgorithms/LR.py)                    | Logistic Regression-based recommendation.                    |\n| [`POLY2.py`](Part1.BasicRecAlgorithms/POLY2.py)              | Polynomial-based recommendation model.                       |\n| [`SVD.ipynb`](Part1.BasicRecAlgorithms/SVD.ipynb)            | Singular Value Decomposition (SVD) for recommendations.      |\n| [`userCF_01label.py`](Part1.BasicRecAlgorithms/userCF_01label.py) | User-based collaborative filtering with binary labels.       |\n| [`userItemCF_15label.ipynb`](Part1.BasicRecAlgorithms/userItemCF_15label.ipynb) | Hybrid user-item collaborative filtering with detailed labels. |\n\n\n------\n\n### **Part 2: Advanced Recommender Systems**\n\nThis chapter explores deep learning-based approaches, such as neural collaborative filtering, embedding methods, and sequence-based models.\n\n| File                                                         | Description                                           |\n| ------------------------------------------------------------ | ----------------------------------------------------- |\n| [`ALS_MLP.ipynb`](Part2.AdvancedRecAlgorithms/ALS_MLP.ipynb) | Neural Collaborative Filtering (NCF) with MLP.        |\n| [`Embedding_CNN.ipynb`](Part2.AdvancedRecAlgorithms/Embedding_CNN.ipynb) | Embedding-based recommendation using CNNs.            |\n| [`Embedding_MLP.ipynb`](Part2.AdvancedRecAlgorithms/Embedding_MLP.ipynb) | Embedding-based recommendation using MLP.             |\n| [`FNN_plus.ipynb`](Part2.AdvancedRecAlgorithms/FNN_plus.ipynb) | Feedforward Neural Networks with additional features. |\n| [`RNN_rec.ipynb`](Part2.AdvancedRecAlgorithms/RNN_rec.ipynb) | Sequential recommendation using RNNs.                 |\n| [`RNN_rec_ALS.ipynb`](Part2.AdvancedRecAlgorithms/RNN_rec_ALS.ipynb) | Combining RNNs with ALS for hybrid recommendations.   |\n\n------\n\n### **Part 3: Graph-Based Recommender Systems**\n\nIn this chapter, we introduce graph neural networks (GNNs) and other graph-based techniques for recommendations.\n *(Files in this directory to be updated.)*\n| File                  | Description                                           |\n| --------------------- | ----------------------------------------------------- |\n------\n\n### **Part 4: Knowledge Graph Recommender Systems**\n\nThis chapter focuses on leveraging knowledge graphs to enhance recommendation quality.\n *(Files in this directory to be updated.)*\n| File                  | Description                                           |\n| --------------------- | ----------------------------------------------------- |\n------\n\n### **Part 5: Constructing Recommender Systems**\n\nThis section delves into building end-to-end recommender systems, including system design and implementation.\n *(Files in this directory to be updated.)*\n| File                  | Description                                           |\n| --------------------- | ----------------------------------------------------- |\n------\n\n### **Part 6: Evaluating Recommender Systems**\n\nThis chapter discusses evaluation techniques and metrics for recommender systems, including accuracy and diversity measures.\n *(Files in this directory to be updated.)*\n| File                  | Description                                           |\n| --------------------- | ----------------------------------------------------- |\n------\n\n## Dataset\n\nThe project uses several datasets, primarily the [**MovieLens**](https://files.grouplens.org/datasets/movielens/) dataset, with different versions organized as follows:\n\n- `ml-100k`: Preprocessed MovieLens 100K dataset.\n- `ml-100k-original`: Original MovieLens 100K dataset.\n- `ml-latest-small`: Latest small version of MovieLens.\n\n------\n\n## Utilities\n\nAdditional scripts and helper functions are stored in the `utils/` directory. These include data preprocessing and utility scripts to facilitate the project.\n| File                                                         | Description                                           |\n| ------------------------------------------------------------ | ----------------------------------------------------- |\n| [`dataloader.py`](utils/dataloader.py)                       | General data loader for recommender systems.          |\n| [`dataloader4ml100kIndexs.py`](utils/dataloader4ml100kIndexs.py) | Data loader for MovieLens 100K with indexed features. |\n| [`dataloader4ml100kOneHot.py`](utils/dataloader4ml100kOneHot.py) | Data loader for MovieLens 100K with one-hot encoding. |\n------\n\n## Getting Started\n\nTo start exploring the code and running experiments:\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/Embraccce/RecStudy.git\n   cd RecStudy\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. Run examples or experiment scripts from respective directories.\n\n------\n\n## Contributing\n\nWe welcome contributions to improve and expand this repository. Feel free to submit issues or pull requests.\n\n------\n\n## License\n\nThis project is licensed under the [MIT License](https://opensource.org/license/MIT).\n\n------\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmbraccce%2FRecStudy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEmbraccce%2FRecStudy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmbraccce%2FRecStudy/lists"}