{"id":29222247,"url":"https://github.com/rebeccamorolong/market--basket--analysis","last_synced_at":"2026-05-10T03:10:10.345Z","repository":{"id":299634654,"uuid":"1003668179","full_name":"RebeccaMorolong/market--basket--analysis","owner":"RebeccaMorolong","description":"Market Basket Analysis using the Apriori algorithm to predict association rules and frequent itemsets from transactional data. The goal was to uncover product combinations that frequently co-occur in transactions, which can be used for recommendations, promotions, and inventory management.","archived":false,"fork":false,"pushed_at":"2025-07-01T11:48:16.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-01T12:41:37.023Z","etag":null,"topics":["apriori-algorithm","numpy","pandas","seaborn"],"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/RebeccaMorolong.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,"zenodo":null}},"created_at":"2025-06-17T13:42:32.000Z","updated_at":"2025-07-01T11:52:03.000Z","dependencies_parsed_at":"2025-06-17T14:52:17.036Z","dependency_job_id":null,"html_url":"https://github.com/RebeccaMorolong/market--basket--analysis","commit_stats":null,"previous_names":["rebeccamorolong/market--basket--analysis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RebeccaMorolong/market--basket--analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RebeccaMorolong%2Fmarket--basket--analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RebeccaMorolong%2Fmarket--basket--analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RebeccaMorolong%2Fmarket--basket--analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RebeccaMorolong%2Fmarket--basket--analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RebeccaMorolong","download_url":"https://codeload.github.com/RebeccaMorolong/market--basket--analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RebeccaMorolong%2Fmarket--basket--analysis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263250593,"owners_count":23437288,"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","numpy","pandas","seaborn"],"created_at":"2025-07-03T03:06:51.007Z","updated_at":"2026-05-10T03:10:10.300Z","avatar_url":"https://github.com/RebeccaMorolong.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Market Basket Analysis Project\n\nThis project performs Market Basket Analysis using the Apriori algorithm to discover association rules and frequent itemsets from transactional data. The goal is to uncover product combinations that frequently co-occur in transactions, which can be used for recommendations, promotions, and inventory management.\n\n## Features\n\n- Data cleaning and preprocessing\n- One-hot encoding of transaction data\n- Frequent itemset mining using Apriori (with support for `low_memory` mode)\n\n# Market Basket Analysis\n\n**Author:** Rebecca Morolong  \n**Project Date:** [Add date]  \n**Language \u0026 Tools:** Python, Jupyter Notebook, pandas, Efficient‑Apriori, MLxtend, matplotlib\n\n---\n\n## 🚀 Project Overview\n\nThis project implements Market Basket Analysis (MBA) on transactional data. By leveraging the Apriori algorithm and association rule mining, it uncovers meaningful item co-occurrence patterns. It includes:\n\n- **Data ingestion** \u0026 **cleaning**  \n- **One-hot encoding** transactions into item matrices  \n- **Frequent itemset mining** via apriori  \n- **Association rule extraction** and filtering (by support/confidence/lift)  \n- **Visualization** of results for interpretability\n\n---\n\n## 🧠 Insights \u0026 Findings\n\nAfter running association rule mining with recommended thresholds, the analysis surfaced several compelling rules:\n\n1. **Unexpected item bundles.**  \n   - e.g., {item A, item B} → item C, with high support and lift, indicating stronger-than-random associations.\n\n2. **Cross-category affinity.**  \n   - Combinations like {cereals, yogurt} → whole milk show cross-category purchasing trends.\n\n3. **Bundling opportunities.**  \n   - Products frequently bought together could be promoted in bundles or along shared shelf space.\n\n4. **Targeted promotional highlights.**  \n   - High-confidence rules (e.g., 0.8+) point to prime candidates for cross-sell.\n\n5. **Channel-specific patterns** *(if geographic data is included)*  \n   - For example, German transactions show popularity of product bundles that differ from overall trends.\n\nThese findings can guide business decisions: optimize store layout, design promotional bundles, boost targeted marketing, and enhance recommendation engines.\n\n---\n\n## 🛠 Usage Instructions\n\n1. Clone this repo:\n   ```bash\n   git clone https://github.com/RebeccaMorolong/market--basket--analysis.git\n\n\n## References\n\n- [mlxtend documentation](http://rasbt.github.io/mlxtend/)\n- [Market Basket Analysis (Wikipedia)](https://en.wikipedia.org/wiki/Market_basket_analysis)\n\n## License\n\nThis project is licensed under the\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebeccamorolong%2Fmarket--basket--analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frebeccamorolong%2Fmarket--basket--analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebeccamorolong%2Fmarket--basket--analysis/lists"}