{"id":20439461,"url":"https://github.com/atharvapathak/market_basket_analysis","last_synced_at":"2026-04-11T13:34:59.007Z","repository":{"id":232572907,"uuid":"784666456","full_name":"atharvapathak/Market_Basket_Analysis","owner":"atharvapathak","description":"This project implements Market Basket Analysis (MBA), using data mining techniques to uncover relationships between products purchased together. By analyzing transaction data, we aim to provide actionable insights to optimize marketing strategies and enhance customer experience.","archived":false,"fork":false,"pushed_at":"2024-04-10T10:02:45.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T20:20:01.439Z","etag":null,"topics":["apriori-algorithm","fp-growth-algorithm","matplotlib","python","sql","statistical-analysis"],"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/atharvapathak.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-04-10T10:02:03.000Z","updated_at":"2024-04-10T10:13:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"551d19f1-615f-4f2c-97e1-53ea4e54f5e0","html_url":"https://github.com/atharvapathak/Market_Basket_Analysis","commit_stats":null,"previous_names":["atharvapathak/market_basket_analysis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atharvapathak%2FMarket_Basket_Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atharvapathak%2FMarket_Basket_Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atharvapathak%2FMarket_Basket_Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atharvapathak%2FMarket_Basket_Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atharvapathak","download_url":"https://codeload.github.com/atharvapathak/Market_Basket_Analysis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241988376,"owners_count":20053657,"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","fp-growth-algorithm","matplotlib","python","sql","statistical-analysis"],"created_at":"2024-11-15T09:17:31.559Z","updated_at":"2025-12-31T01:02:35.149Z","avatar_url":"https://github.com/atharvapathak.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Market Basket Analysis of Store Data\n\n## Dataset Description\n\n* Different products given 7500 transactions over the course of a week at a French retail store.\n* We have library(**apyori**) to calculate the association rule using Apriori.\n\n## Import the Library\n\n\n```python\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom apyori import apriori\n```\n\n## Read data and Display\n\n\n```python\nstore_data = pd.read_csv(\"store_data.csv\", header=None)\ndisplay(store_data.head())\nprint(store_data.shape)\n```\n\n\n\u003cdiv\u003e\n\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003e0\u003c/th\u003e\n      \u003cth\u003e1\u003c/th\u003e\n      \u003cth\u003e2\u003c/th\u003e\n      \u003cth\u003e3\u003c/th\u003e\n      \u003cth\u003e4\u003c/th\u003e\n      \u003cth\u003e5\u003c/th\u003e\n      \u003cth\u003e6\u003c/th\u003e\n      \u003cth\u003e7\u003c/th\u003e\n      \u003cth\u003e8\u003c/th\u003e\n      \u003cth\u003e9\u003c/th\u003e\n      \u003cth\u003e10\u003c/th\u003e\n      \u003cth\u003e11\u003c/th\u003e\n      \u003cth\u003e12\u003c/th\u003e\n      \u003cth\u003e13\u003c/th\u003e\n      \u003cth\u003e14\u003c/th\u003e\n      \u003cth\u003e15\u003c/th\u003e\n      \u003cth\u003e16\u003c/th\u003e\n      \u003cth\u003e17\u003c/th\u003e\n      \u003cth\u003e18\u003c/th\u003e\n      \u003cth\u003e19\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e0\u003c/th\u003e\n      \u003ctd\u003eshrimp\u003c/td\u003e\n      \u003ctd\u003ealmonds\u003c/td\u003e\n      \u003ctd\u003eavocado\u003c/td\u003e\n      \u003ctd\u003evegetables mix\u003c/td\u003e\n      \u003ctd\u003egreen grapes\u003c/td\u003e\n      \u003ctd\u003ewhole weat flour\u003c/td\u003e\n      \u003ctd\u003eyams\u003c/td\u003e\n      \u003ctd\u003ecottage cheese\u003c/td\u003e\n      \u003ctd\u003eenergy drink\u003c/td\u003e\n      \u003ctd\u003etomato juice\u003c/td\u003e\n      \u003ctd\u003elow fat yogurt\u003c/td\u003e\n      \u003ctd\u003egreen tea\u003c/td\u003e\n      \u003ctd\u003ehoney\u003c/td\u003e\n      \u003ctd\u003esalad\u003c/td\u003e\n      \u003ctd\u003emineral water\u003c/td\u003e\n      \u003ctd\u003esalmon\u003c/td\u003e\n      \u003ctd\u003eantioxydant juice\u003c/td\u003e\n      \u003ctd\u003efrozen smoothie\u003c/td\u003e\n      \u003ctd\u003espinach\u003c/td\u003e\n      \u003ctd\u003eolive oil\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e1\u003c/th\u003e\n      \u003ctd\u003eburgers\u003c/td\u003e\n      \u003ctd\u003emeatballs\u003c/td\u003e\n      \u003ctd\u003eeggs\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2\u003c/th\u003e\n      \u003ctd\u003echutney\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e3\u003c/th\u003e\n      \u003ctd\u003eturkey\u003c/td\u003e\n      \u003ctd\u003eavocado\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e4\u003c/th\u003e\n      \u003ctd\u003emineral water\u003c/td\u003e\n      \u003ctd\u003emilk\u003c/td\u003e\n      \u003ctd\u003eenergy bar\u003c/td\u003e\n      \u003ctd\u003ewhole wheat rice\u003c/td\u003e\n      \u003ctd\u003egreen tea\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n    (7501, 20)\n    \n\n## Preprocessing on Data\n*  Here we need a data in form of list for Apriori Algorithm.\n\n\n```python\nrecords = []\nfor i in range(1, 7501):\n    records.append([str(store_data.values[i, j]) for j in range(0, 20)])\n```\n\n\n```python\nprint(type(records))\n```\n\n    \u003cclass 'list'\u003e\n    \n\n## Apriori Algorithm\n\n* Now time to apply algorithm on data.\n* We have provide `min_support`, `min_confidence`, `min_lift`, and `min length` of sample-set for find rule.\n\n#### Measure 1: Support.\nThis says how popular an itemset is, as measured by the proportion of transactions in which an itemset appears. In Table 1 below, the support of {apple} is 4 out of 8, or 50%. Itemsets can also contain multiple items. For instance, the support of {apple, beer, rice} is 2 out of 8, or 25%.\n\n![](https://annalyzin.files.wordpress.com/2016/04/association-rule-support-table.png?w=503\u0026h=447)\n\nIf you discover that sales of items beyond a certain proportion tend to have a significant impact on your profits, you might consider using that proportion as your support threshold. You may then identify itemsets with support values above this threshold as significant itemsets.\n\n#### Measure 2: Confidence. \nThis says how likely item Y is purchased when item X is purchased, expressed as {X -\u003e Y}. This is measured by the proportion of transactions with item X, in which item Y also appears. In Table 1, the confidence of {apple -\u003e beer} is 3 out of 4, or 75%.\n\n![](https://annalyzin.files.wordpress.com/2016/03/association-rule-confidence-eqn.png?w=527\u0026h=77)\n\nOne drawback of the confidence measure is that it might misrepresent the importance of an association. This is because it only accounts for how popular apples are, but not beers. If beers are also very popular in general, there will be a higher chance that a transaction containing apples will also contain beers, thus inflating the confidence measure. To account for the base popularity of both constituent items, we use a third measure called lift.\n\n#### Measure 3: Lift. \nThis says how likely item Y is purchased when item X is purchased, while controlling for how popular item Y is. In Table 1, the lift of {apple -\u003e beer} is 1,which implies no association between items. A lift value greater than 1 means that item Y is likely to be bought if item X is bought, while a value less than 1 means that item Y is unlikely to be bought if item X is bought.\n![](https://annalyzin.files.wordpress.com/2016/03/association-rule-lift-eqn.png?w=566\u0026h=80)\n\n\n```python\nassociation_rules = apriori(records, min_support=0.0045, min_confidence=0.2, min_lift=3, min_length=2)\nassociation_results = list(association_rules)\n```\n\n## How many relation derived\n\n\n```python\nprint(\"There are {} Relation derived.\".format(len(association_results)))\n```\n\n    There are 48 Relation derived.\n    \n\n### Association Rules Derived\n\n\n```python\nfor i in range(0, len(association_results)):\n    print(association_results[i][0])\n```\n\n    frozenset({'light cream', 'chicken'})\n    frozenset({'escalope', 'mushroom cream sauce'})\n    frozenset({'escalope', 'pasta'})\n    frozenset({'herb \u0026 pepper', 'ground beef'})\n    frozenset({'tomato sauce', 'ground beef'})\n    frozenset({'olive oil', 'whole wheat pasta'})\n    frozenset({'shrimp', 'pasta'})\n    frozenset({'nan', 'light cream', 'chicken'})\n    frozenset({'shrimp', 'chocolate', 'frozen vegetables'})\n    frozenset({'cooking oil', 'spaghetti', 'ground beef'})\n    frozenset({'escalope', 'mushroom cream sauce', 'nan'})\n    frozenset({'escalope', 'pasta', 'nan'})\n    frozenset({'spaghetti', 'ground beef', 'frozen vegetables'})\n    frozenset({'milk', 'olive oil', 'frozen vegetables'})\n    frozenset({'shrimp', 'mineral water', 'frozen vegetables'})\n    frozenset({'spaghetti', 'olive oil', 'frozen vegetables'})\n    frozenset({'shrimp', 'spaghetti', 'frozen vegetables'})\n    frozenset({'spaghetti', 'frozen vegetables', 'tomatoes'})\n    frozenset({'spaghetti', 'ground beef', 'grated cheese'})\n    frozenset({'herb \u0026 pepper', 'ground beef', 'mineral water'})\n    frozenset({'herb \u0026 pepper', 'nan', 'ground beef'})\n    frozenset({'herb \u0026 pepper', 'spaghetti', 'ground beef'})\n    frozenset({'milk', 'ground beef', 'olive oil'})\n    frozenset({'nan', 'tomato sauce', 'ground beef'})\n    frozenset({'shrimp', 'spaghetti', 'ground beef'})\n    frozenset({'milk', 'spaghetti', 'olive oil'})\n    frozenset({'soup', 'mineral water', 'olive oil'})\n    frozenset({'nan', 'olive oil', 'whole wheat pasta'})\n    frozenset({'shrimp', 'nan', 'pasta'})\n    frozenset({'spaghetti', 'pancakes', 'olive oil'})\n    frozenset({'shrimp', 'chocolate', 'frozen vegetables', 'nan'})\n    frozenset({'cooking oil', 'nan', 'spaghetti', 'ground beef'})\n    frozenset({'nan', 'spaghetti', 'ground beef', 'frozen vegetables'})\n    frozenset({'milk', 'spaghetti', 'mineral water', 'frozen vegetables'})\n    frozenset({'milk', 'nan', 'olive oil', 'frozen vegetables'})\n    frozenset({'shrimp', 'nan', 'mineral water', 'frozen vegetables'})\n    frozenset({'nan', 'spaghetti', 'olive oil', 'frozen vegetables'})\n    frozenset({'shrimp', 'nan', 'spaghetti', 'frozen vegetables'})\n    frozenset({'nan', 'spaghetti', 'frozen vegetables', 'tomatoes'})\n    frozenset({'nan', 'spaghetti', 'ground beef', 'grated cheese'})\n    frozenset({'herb \u0026 pepper', 'nan', 'ground beef', 'mineral water'})\n    frozenset({'herb \u0026 pepper', 'nan', 'spaghetti', 'ground beef'})\n    frozenset({'milk', 'nan', 'ground beef', 'olive oil'})\n    frozenset({'shrimp', 'nan', 'spaghetti', 'ground beef'})\n    frozenset({'milk', 'nan', 'spaghetti', 'olive oil'})\n    frozenset({'nan', 'soup', 'mineral water', 'olive oil'})\n    frozenset({'nan', 'spaghetti', 'pancakes', 'olive oil'})\n    frozenset({'milk', 'frozen vegetables', 'nan', 'spaghetti', 'mineral water'})\n    \n\n## Rules Generated\n\n\n```python\nfor item in association_results:\n    # first index of the inner list\n    # Contains base item and add item\n    pair = item[0]\n    items = [x for x in pair]\n    print(\"Rule: \" + items[0] + \" -\u003e \" + items[1])\n\n    # second index of the inner list\n    print(\"Support: \" + str(item[1]))\n\n    # third index of the list located at 0th\n    # of the third index of the inner list\n\n    print(\"Confidence: \" + str(item[2][0][2]))\n    print(\"Lift: \" + str(item[2][0][3]))\n    print(\"=====================================\")\n```\n\n    Rule: light cream -\u003e chicken\n    Support: 0.004533333333333334\n    Confidence: 0.2905982905982906\n    Lift: 4.843304843304844\n    =====================================\n    Rule: escalope -\u003e mushroom cream sauce\n    Support: 0.005733333333333333\n    Confidence: 0.30069930069930073\n    Lift: 3.7903273197390845\n    =====================================\n    Rule: escalope -\u003e pasta\n    Support: 0.005866666666666667\n    Confidence: 0.37288135593220345\n    Lift: 4.700185158809287\n    =====================================\n    Rule: herb \u0026 pepper -\u003e ground beef\n    Support: 0.016\n    Confidence: 0.3234501347708895\n    Lift: 3.2915549671393096\n    =====================================\n    Rule: tomato sauce -\u003e ground beef\n    Support: 0.005333333333333333\n    Confidence: 0.37735849056603776\n    Lift: 3.840147461662528\n    =====================================\n    Rule: olive oil -\u003e whole wheat pasta\n    Support: 0.008\n    Confidence: 0.2714932126696833\n    Lift: 4.130221288078346\n    =====================================\n    Rule: shrimp -\u003e pasta\n    Support: 0.005066666666666666\n    Confidence: 0.3220338983050848\n    Lift: 4.514493901473151\n    =====================================\n    Rule: nan -\u003e light cream\n    Support: 0.004533333333333334\n    Confidence: 0.2905982905982906\n    Lift: 4.843304843304844\n    =====================================\n    Rule: shrimp -\u003e chocolate\n    Support: 0.005333333333333333\n    Confidence: 0.23255813953488372\n    Lift: 3.260160834601174\n    =====================================\n    Rule: cooking oil -\u003e spaghetti\n    Support: 0.0048\n    Confidence: 0.5714285714285714\n    Lift: 3.281557646029315\n    =====================================\n    Rule: escalope -\u003e mushroom cream sauce\n    Support: 0.005733333333333333\n    Confidence: 0.30069930069930073\n    Lift: 3.7903273197390845\n    =====================================\n    Rule: escalope -\u003e pasta\n    Support: 0.005866666666666667\n    Confidence: 0.37288135593220345\n    Lift: 4.700185158809287\n    =====================================\n    Rule: spaghetti -\u003e ground beef\n    Support: 0.008666666666666666\n    Confidence: 0.3110047846889952\n    Lift: 3.164906221394116\n    =====================================\n    Rule: milk -\u003e olive oil\n    Support: 0.0048\n    Confidence: 0.20338983050847456\n    Lift: 3.094165778526489\n    =====================================\n    Rule: shrimp -\u003e mineral water\n    Support: 0.0072\n    Confidence: 0.3068181818181818\n    Lift: 3.2183725365543547\n    =====================================\n    Rule: spaghetti -\u003e olive oil\n    Support: 0.005733333333333333\n    Confidence: 0.20574162679425836\n    Lift: 3.1299436124887174\n    =====================================\n    Rule: shrimp -\u003e spaghetti\n    Support: 0.006\n    Confidence: 0.21531100478468898\n    Lift: 3.0183785717479763\n    =====================================\n    Rule: spaghetti -\u003e frozen vegetables\n    Support: 0.006666666666666667\n    Confidence: 0.23923444976076555\n    Lift: 3.497579674864993\n    =====================================\n    Rule: spaghetti -\u003e ground beef\n    Support: 0.005333333333333333\n    Confidence: 0.3225806451612903\n    Lift: 3.282706701098612\n    =====================================\n    Rule: herb \u0026 pepper -\u003e ground beef\n    Support: 0.006666666666666667\n    Confidence: 0.390625\n    Lift: 3.975152645861601\n    =====================================\n    Rule: herb \u0026 pepper -\u003e nan\n    Support: 0.016\n    Confidence: 0.3234501347708895\n    Lift: 3.2915549671393096\n    =====================================\n    Rule: herb \u0026 pepper -\u003e spaghetti\n    Support: 0.0064\n    Confidence: 0.3934426229508197\n    Lift: 4.003825878061259\n    =====================================\n    Rule: milk -\u003e ground beef\n    Support: 0.004933333333333333\n    Confidence: 0.22424242424242424\n    Lift: 3.411395906324912\n    =====================================\n    Rule: nan -\u003e tomato sauce\n    Support: 0.005333333333333333\n    Confidence: 0.37735849056603776\n    Lift: 3.840147461662528\n    =====================================\n    Rule: shrimp -\u003e spaghetti\n    Support: 0.006\n    Confidence: 0.5232558139534884\n    Lift: 3.004914704939635\n    =====================================\n    Rule: milk -\u003e spaghetti\n    Support: 0.0072\n    Confidence: 0.20300751879699247\n    Lift: 3.0883496774390333\n    =====================================\n    Rule: soup -\u003e mineral water\n    Support: 0.0052\n    Confidence: 0.2254335260115607\n    Lift: 3.4295161157945335\n    =====================================\n    Rule: nan -\u003e olive oil\n    Support: 0.008\n    Confidence: 0.2714932126696833\n    Lift: 4.130221288078346\n    =====================================\n    Rule: shrimp -\u003e nan\n    Support: 0.005066666666666666\n    Confidence: 0.3220338983050848\n    Lift: 4.514493901473151\n    =====================================\n    Rule: spaghetti -\u003e pancakes\n    Support: 0.005066666666666666\n    Confidence: 0.20105820105820105\n    Lift: 3.0586947422647217\n    =====================================\n    Rule: shrimp -\u003e chocolate\n    Support: 0.005333333333333333\n    Confidence: 0.23255813953488372\n    Lift: 3.260160834601174\n    =====================================\n    Rule: cooking oil -\u003e nan\n    Support: 0.0048\n    Confidence: 0.5714285714285714\n    Lift: 3.281557646029315\n    =====================================\n    Rule: nan -\u003e spaghetti\n    Support: 0.008666666666666666\n    Confidence: 0.3110047846889952\n    Lift: 3.164906221394116\n    =====================================\n    Rule: milk -\u003e spaghetti\n    Support: 0.004533333333333334\n    Confidence: 0.28813559322033905\n    Lift: 3.0224013274860737\n    =====================================\n    Rule: milk -\u003e nan\n    Support: 0.0048\n    Confidence: 0.20338983050847456\n    Lift: 3.094165778526489\n    =====================================\n    Rule: shrimp -\u003e nan\n    Support: 0.0072\n    Confidence: 0.3068181818181818\n    Lift: 3.2183725365543547\n    =====================================\n    Rule: nan -\u003e spaghetti\n    Support: 0.005733333333333333\n    Confidence: 0.20574162679425836\n    Lift: 3.1299436124887174\n    =====================================\n    Rule: shrimp -\u003e nan\n    Support: 0.006\n    Confidence: 0.21531100478468898\n    Lift: 3.0183785717479763\n    =====================================\n    Rule: nan -\u003e spaghetti\n    Support: 0.006666666666666667\n    Confidence: 0.23923444976076555\n    Lift: 3.497579674864993\n    =====================================\n    Rule: nan -\u003e spaghetti\n    Support: 0.005333333333333333\n    Confidence: 0.3225806451612903\n    Lift: 3.282706701098612\n    =====================================\n    Rule: herb \u0026 pepper -\u003e nan\n    Support: 0.006666666666666667\n    Confidence: 0.390625\n    Lift: 3.975152645861601\n    =====================================\n    Rule: herb \u0026 pepper -\u003e nan\n    Support: 0.0064\n    Confidence: 0.3934426229508197\n    Lift: 4.003825878061259\n    =====================================\n    Rule: milk -\u003e nan\n    Support: 0.004933333333333333\n    Confidence: 0.22424242424242424\n    Lift: 3.411395906324912\n    =====================================\n    Rule: shrimp -\u003e nan\n    Support: 0.006\n    Confidence: 0.5232558139534884\n    Lift: 3.004914704939635\n    =====================================\n    Rule: milk -\u003e nan\n    Support: 0.0072\n    Confidence: 0.20300751879699247\n    Lift: 3.0883496774390333\n    =====================================\n    Rule: nan -\u003e soup\n    Support: 0.0052\n    Confidence: 0.2254335260115607\n    Lift: 3.4295161157945335\n    =====================================\n    Rule: nan -\u003e spaghetti\n    Support: 0.005066666666666666\n    Confidence: 0.20105820105820105\n    Lift: 3.0586947422647217\n    =====================================\n    Rule: milk -\u003e frozen vegetables\n    Support: 0.004533333333333334\n    Confidence: 0.28813559322033905\n    Lift: 3.0224013274860737\n    =====================================\n    \n\nReferences : \n**Theory** :\n1. https://www.kdnuggets.com/2016/04/association-rules-apriori-algorithm-tutorial.html\n2. https://stackabuse.com/association-rule-mining-via-apriori-algorithm-in-python/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatharvapathak%2Fmarket_basket_analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatharvapathak%2Fmarket_basket_analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatharvapathak%2Fmarket_basket_analysis/lists"}