{"id":22827527,"url":"https://github.com/imsrbh/recsysassociationpy","last_synced_at":"2025-06-16T22:34:41.365Z","repository":{"id":182742219,"uuid":"668936483","full_name":"imSrbh/RecsysAssociationPy","owner":"imSrbh","description":"Collaborative Filtering and Association Rule Mining App","archived":false,"fork":false,"pushed_at":"2023-07-21T02:01:54.000Z","size":125597,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T08:22:40.548Z","etag":null,"topics":["apriori-algorithm","association-rule-mining","colaborative-filtering","fpgrowth","recommender-system"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/imSrbh.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}},"created_at":"2023-07-21T00:49:15.000Z","updated_at":"2023-07-21T05:46:20.000Z","dependencies_parsed_at":"2023-07-21T08:07:47.219Z","dependency_job_id":null,"html_url":"https://github.com/imSrbh/RecsysAssociationPy","commit_stats":null,"previous_names":["imsrbh/recsysassociationpy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imSrbh/RecsysAssociationPy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imSrbh%2FRecsysAssociationPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imSrbh%2FRecsysAssociationPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imSrbh%2FRecsysAssociationPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imSrbh%2FRecsysAssociationPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imSrbh","download_url":"https://codeload.github.com/imSrbh/RecsysAssociationPy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imSrbh%2FRecsysAssociationPy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260252850,"owners_count":22981341,"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":["apriori-algorithm","association-rule-mining","colaborative-filtering","fpgrowth","recommender-system"],"created_at":"2024-12-12T18:12:29.126Z","updated_at":"2025-06-16T22:34:41.343Z","avatar_url":"https://github.com/imSrbh.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RecsysAssociationPy\n# Collaborative Filtering and Association Rule Mining App\n\nThis is a Python application that implements collaborative filtering for item recommendation and association rule mining based on the Apriori and FPGrowth algorithms. The app is built using Flask, a lightweight web framework for Python.\n\n## Requirements\n\nTo run this app, you need to have the following installed:\n\n- Python 3.7 or higher\n- Flask\n- pandas\n- mlxtend\n\nYou can install the required packages using the following command:\n\n```bash\npip install -r requirements.txt\n```\n\n\n\n## Dataset\n\nThe app uses the \"OnlineRetail.csv\" dataset for collaborative filtering and association rule mining. The dataset contains online retail transaction data. The app loads and preprocesses the data to create customer-item and item-item matrices for collaborative filtering.\n\n## How to Use : Docker [Suggested]\n\n1. Clone this repository to your local machine.\n\n2. Navigate to the project directory containing the Dockerfile.\n\n3. Build the Docker image by running the following command:\n\n```bash\ndocker build -t collaborative-app .\n```\n\nReplace `collaborative-app` with the desired name for your Docker image.\n\n4. Once the image is built, run the Docker container using the following command:\n\n```bash\ndocker run -p 5000:5000 collaborative-app\n```\n\n5. The Flask app will now be running inside the Docker container. You can access it at [http://localhost:5000](http://localhost:5000) on your local machine.\n\n\n## How to Run Locally\n\n```bash\npython3.7 -m venv .env\n\nsource .env/bin/activate\n\npip3 install -r requirements.txt\n\npython3 app.py \n```\n\n## Endpoints\n\nThe app provides the following endpoints:\n\n- `/item-recommendation`: Recommends similar items based on an input item ID.\n- `/user-recommendation`: Recommends items to one user based on the items purchased by another user.\n- `/apriori-recommendation`: Mines association rules using the Apriori algorithm and provides recommendations based on the rules.\n- `/fpgrowth-recommendation`: Mines association rules using the FPGrowth algorithm and provides recommendations based on the rules.\n\n\n\n## Example Usage\n\n1. To get item recommendations based on item ID 23167:\n\n```bash\ncurl http://localhost:5000/item-recommendation?item_id=23167\n```\n\n2. To get user-based item recommendations for users with IDs 12583 and 13047:\n\n```bash\ncurl http://localhost:5000/user-recommendation?user_idA=12583\u0026user_idB=13047\n```\n\n3. To mine association rules using apriori and get recommendations based on the rules:\n\n```bash\ncurl http://localhost:5000/apriori-recommendation?min_support=0.01\u0026min_threshold=0.5\n```\n\n4. To mine association rules using fpgrowth and get recommendations based on the rules:\n\n```bash\ncurl http://127.0.0.1:5000/fpgrowth-recommendation?min_support=0.01\u0026min_threshold=0.5\n```\n\n## Notes\n\n- The app uses cosine similarity for collaborative filtering.\n- The Apriori and FPGrowth algorithms are used for association rule mining.\n- The dataset should be placed in the project directory and named \"OnlineRetail.csv\".\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimsrbh%2Frecsysassociationpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimsrbh%2Frecsysassociationpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimsrbh%2Frecsysassociationpy/lists"}