{"id":17307,"date":"2020-07-20T12:13:40","date_gmt":"2020-07-20T06:43:40","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/"},"modified":"2025-05-14T18:07:18","modified_gmt":"2025-05-14T12:37:18","slug":"apriori-algorithm-explained","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/","title":{"rendered":"Apriori Algorithm in Data Mining with Examples"},"content":{"rendered":"\n<p>The Apriori algorithm serves <a href=\"https:\/\/www.mygreatlearning.com\/blog\/data-mining-tutorial\/\">data mining<\/a> operations by identifying important patterns within extensive databases. The algorithm proves its strength in identifying relationships among transactions in databases such as retail shopping cart records. Using the \u201cfrequent itemsets\u201d concept, Apriori enables analysts to uncover essential understanding of consumers' behaviour.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-the-apriori-algorithm\">What is the Apriori Algorithm?<\/h2>\n\n\n\n<p>The Apriori algorithm represents a core data mining approach for association rule learning that discovers frequent itemsets while identifying relationships between items in big transactional databases.&nbsp;<\/p>\n\n\n\n<p>Rakesh Agrawal and Ramakrishnan Srikant introduced this algorithm in 1994 by adopting the \"Apriori property\" to shrink the search area. It labelled frequent itemsets as those where all subset items must also be frequent.&nbsp;<\/p>\n\n\n\n<p>Association rule mining heavily depends on Apriori because it helps uncover the \u201citem A purchase leads to item B purchase\u201d rules using support, confidence, and lift metrics.&nbsp;<\/p>\n\n\n\n<p>The widespread application of this method appears in market basket analysis, together with recommendation systems and multiple domains that require pattern identification in item correlations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"key-concepts-and-terminology\">Key Concepts and Terminology<\/h2>\n\n\n<figure class=\"wp-block-image aligncenter size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algo-key-terminology.webp\"><img decoding=\"async\" width=\"683\" height=\"1024\" src=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algo-key-terminology-683x1024.webp\" alt=\"Key Concepts of Apriori Algorithm\" class=\"wp-image-107483\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algo-key-terminology-683x1024.webp 683w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algo-key-terminology-200x300.webp 200w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algo-key-terminology-768x1152.webp 768w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algo-key-terminology-150x225.webp 150w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algo-key-terminology.webp 1024w\" sizes=\"(max-width: 683px) 100vw, 683px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-itemset\">1. Itemset:&nbsp;<\/h3>\n\n\n\n<p>A dataset contains one or multiple items as a single unit. An example of an e-commerce item set in this context would be a laptop and a wireless mouse.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-support\">2. Support:&nbsp;<\/h3>\n\n\n\n<p>The occurrence frequency of itemsets appears within the dataset. The support value equals 3% when the itemset containing a laptop and wireless mouse occurs in 30 out of 1,000 transactions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-confidence\">3. Confidence:&nbsp;<\/h3>\n\n\n\n<p>Itemset Y's existence among transactions that include itemset X signifies the confidence measurement. The rule \u201claptop \u21d2 wireless mouse\u201d achieves a confidence of 60% because 3% of transactions display both items, whereas 5% contain only a laptop.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-lift\">4. Lift:&nbsp;<\/h3>\n\n\n\n<p>The lift measure determines the probability that item Y will be purchased along with item X above a random chance basis. The 1.5 lift value for the rule connecting laptops to wireless mouse indicates that shoppers become fifty percent more likely to purchase a wireless mouse after acquiring a laptop than under random circumstances.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5-apriori-property\">5. Apriori Property:&nbsp;<\/h3>\n\n\n\n<p>According to the Apriori property, any subset of a frequent group of items must be present frequently in the database. The algorithm benefits from this property by eliminating those item sets containing infrequent subsets during the mining process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-the-apriori-algorithm-works-step-by-step-breakdown\">How the Apriori Algorithm Works: Step-by-Step Breakdown<\/h2>\n\n\n\n<p>The <strong>Apriori algorithm<\/strong> follows a systematic approach to discover frequent itemsets and generate association rules from transactional data. Here's an overview of how the algorithm works:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Set Parameters: Minimum Support and Confidence<\/li>\n<\/ol>\n\n\n\n<p>Before starting, the algorithm requires the user to define two key thresholds:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Minimum Support<\/strong>: This is the frequency with which an itemset must appear in the dataset to be considered frequent.<\/li>\n\n\n\n<li><strong>Minimum Confidence<\/strong>: This defines the likelihood that a rule will hold true, based on the frequent itemsets.<\/li>\n<\/ul>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Identify Frequent Itemsets (1-itemsets)<\/li>\n<\/ol>\n\n\n\n<p>The algorithm first scans the entire dataset to find individual items (1-itemsets) that meet the minimum support threshold. These items are considered frequent.<\/p>\n\n\n\n<p><strong>Example<\/strong>:<br>In a retail store dataset, let\u2019s say we have the following transactions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Transaction 1: {laptop, wireless mouse, keyboard}<\/li>\n\n\n\n<li>Transaction 2: {laptop, wireless mouse}<\/li>\n\n\n\n<li>Transaction 3: {keyboard, wireless mouse}<\/li>\n<\/ul>\n\n\n\n<p>If the minimum support threshold is 50%, we check how often each item appears. In this case, {laptop}, {wireless mouse}, and {keyboard} are frequent 1-itemsets.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-generate-candidate-itemsets-k-itemsets\">3. Generate Candidate Itemsets (k-itemsets)<\/h3>\n\n\n\n<p>The next step involves forming pairs of items (2-itemsets) by combining frequent 1-itemsets. This process is repeated to generate 3-itemsets, 4-itemsets, and so on, until no more frequent itemsets can be formed. The candidate itemsets are then validated against the support threshold.<\/p>\n\n\n\n<p><strong>Example<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>During the evaluation process for 2-itemsets, the algorithm analyses the combinations between laptop and wireless mouse, laptop and keyboard, and wireless mouse and keyboard.<\/li>\n\n\n\n<li>The minimum support threshold determines which pairs become frequent items (such as {laptop, wireless mouse} appearing in 2 out of 3 transactions).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-prune-non-frequent-itemsets-using-the-apriori-property\">4. Prune Non-Frequent Itemsets Using the Apriori Property<\/h3>\n\n\n\n<p>As per the Apriori property, if an itemset includes frequent components, then all of its subsets need to be frequent as well. During <a href=\"https:\/\/www.mygreatlearning.com\/blog\/alpha-beta-pruning-in-ai\/\">pruning<\/a>, the algorithm discards candidate item sets that contain infrequent subsets.<\/p>\n\n\n\n<p><strong>Example<\/strong>:<br>If {laptop, keyboard} is a candidate itemset, but its subset {keyboard} is not frequent, then {laptop, keyboard} is also discarded, reducing unnecessary checks.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5-repeat-for-higher-order-itemsets\">5. Repeat for Higher-Order Itemsets<\/h3>\n\n\n\n<p>The process is repeated for higher-order itemsets (3-itemsets, 4-itemsets, etc.). The algorithm continues generating combinations and checking their support until no further frequent itemsets can be found.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"6-generate-association-rules\">6. Generate Association Rules<\/h3>\n\n\n\n<p>Once all frequent itemsets have been found, the next step is to generate <strong>association rules<\/strong>. These rules take the form:<br><br><strong>{Itemset A} \u21d2 {Itemset B}<\/strong><\/p>\n\n\n\n<p>The algorithm calculates the <strong>confidence<\/strong> for each rule to determine how likely item B is to be purchased when item A is purchased.<\/p>\n\n\n\n<p><strong>Example<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Rule: If a customer buys a <strong>laptop<\/strong>, they will also buy a <strong>wireless<\/strong> <strong>mouse<\/strong>.<\/li>\n\n\n\n<li>Confidence calculation: If 2 out of 3 transactions containing a laptop also contain a wireless mouse, the confidence is 66.7%.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"7-filter-by-confidence-threshold\">7. Filter by Confidence Threshold<\/h3>\n\n\n\n<p>Finally, the algorithm filters out any rules that don\u2019t meet the minimum confidence threshold.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example\"><strong>Example:<\/strong><\/h3>\n\n\n\n<p>Let\u2019s say we have a retail store with the following transactions:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Transaction<\/strong><\/td><td><strong>Items<\/strong><\/td><\/tr><tr><td>1<\/td><td>{laptop, wireless mouse, keyboard}<\/td><\/tr><tr><td>2<\/td><td>{laptop, wireless mouse}<\/td><\/tr><tr><td>3<\/td><td>{keyboard, wireless mouse}<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"step-1-identify-frequent-1-itemsets\"><br><strong>Step 1<\/strong>: Identify frequent 1-itemsets:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>{laptop}<\/strong>: Appears in 2 out of 3 transactions (support = 66.7%).<\/li>\n\n\n\n<li><strong>{wireless mouse}<\/strong>: Appears in 3 out of 3 transactions (support = 100%).<\/li>\n\n\n\n<li><strong>{keyboard}<\/strong>: Appears in 2 out of 3 transactions (support = 66.7%).<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Step 2<\/strong>: Generate candidate 2-itemsets:\n<ul class=\"wp-block-list\">\n<li><strong>{laptop, wireless mouse}<\/strong>: Appears in 2 out of 3 transactions (support = 66.7%).<\/li>\n\n\n\n<li><strong>{laptop, keyboard}<\/strong>: Appears in 1 out of 3 transactions (support = 33.3%)\u2014discarded.<\/li>\n\n\n\n<li><strong>{wireless mouse, keyboard}<\/strong>: Appears in 2 out of 3 transactions (support = 66.7%).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Step 3<\/strong>: Generate candidate 3-itemsets:\n<ul class=\"wp-block-list\">\n<li><strong>{laptop, wireless mouse, keyboard}<\/strong>: Appears in 1 out of 3 transactions (support = 33.3%)\u2014discarded.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Step 4<\/strong>: Generate association rules:\n<ul class=\"wp-block-list\">\n<li><strong>{laptop} \u21d2 {wireless mouse}<\/strong>: Confidence = 2\/2 = 100%.<\/li>\n\n\n\n<li><strong>{wireless mouse} \u21d2 {laptop}<\/strong>: Confidence = 2\/3 = 66.7%.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>In this example, the frequent itemsets are {laptop}, {wireless mouse}, {keyboard}, {laptop, wireless mouse}, and {wireless mouse, keyboard}. The association rule <strong>{laptop} \u21d2 {wireless mouse}<\/strong> has high confidence, indicating a strong relationship between the two items.<\/p>\n\n\n\n<p>Want to dive deeper into how the Apriori algorithm uncovers valuable patterns in data?<a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/apriori-algorithm\"> Explore this free Apriori Algorithm course by Great Learning<\/a> and get hands-on experience with real-world applications!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"apriori-algorithm-example-music-dataset\">Apriori Algorithm Example: Music Dataset<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"sample-transaction-dataset\"><strong>Sample Transaction Dataset:<\/strong><\/h4>\n\n\n\n<p>Each transaction consists of a list of albums purchased by a customer.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Transaction ID<\/strong><\/td><td><strong>Items Purchased<\/strong><\/td><\/tr><tr><td>T1<\/td><td>{Rock, Jazz}<\/td><\/tr><tr><td>T2<\/td><td>{Jazz, Pop, Classical}<\/td><\/tr><tr><td>T3<\/td><td>{Rock, Pop}<\/td><\/tr><tr><td>T4<\/td><td>{Jazz, Rock, Pop, Classical}<\/td><\/tr><tr><td>T5<\/td><td>{Pop, Classical}<\/td><\/tr><tr><td>T6<\/td><td>{Rock, Jazz, Classical}<\/td><\/tr><tr><td>T7<\/td><td>{Jazz, Pop, Classical}<\/td><\/tr><tr><td>T8<\/td><td>{Rock, Pop, Jazz}<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-calculate-support-for-1-itemsets\">Step 1: Calculate Support for 1-itemsets<\/h3>\n\n\n\n<p>Support for an itemset is the fraction of transactions that contain the itemset.<\/p>\n\n\n\n<p><strong>Support Formula:<\/strong><\/p>\n\n\n<figure class=\"wp-block-image size-full zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/support-formula.png\"><img decoding=\"async\" width=\"752\" height=\"67\" src=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/support-formula.png\" alt=\"Support Formula\" class=\"wp-image-107487\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/support-formula.png 752w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/support-formula-300x27.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/support-formula-150x13.png 150w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<p>Let's calculate the support for each individual album (1-itemset).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Item<\/strong><\/td><td><strong>Count<\/strong><\/td><td><strong>Support<\/strong><\/td><\/tr><tr><td>Rock<\/td><td>5<\/td><td>5\/8 = 0.625<\/td><\/tr><tr><td>Jazz<\/td><td>6<\/td><td>6\/8 = 0.75<\/td><\/tr><tr><td>Pop<\/td><td>5<\/td><td>5\/8 = 0.625<\/td><\/tr><tr><td>Classical<\/td><td>4<\/td><td>4\/8 = 0.5<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Assume the minimum support threshold is <strong>0.5<\/strong>. Based on this threshold, <strong>Classical<\/strong> will be filtered out, as its support is less than 0.5.<\/p>\n\n\n\n<p><strong>Frequent 1-itemsets:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Rock, Jazz, Pop<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-generate-2-itemset-candidates\">Step 2: Generate 2-itemset Candidates<\/h3>\n\n\n\n<p>Now, we will form all possible pairs of frequent 1-itemsets and calculate their support. For example, the pairings are (Rock, Jazz), (Rock, Pop), and so on.<\/p>\n\n\n\n<p><strong>Support Calculation for 2-itemsets:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Itemset<\/strong><\/td><td><strong>Count<\/strong><\/td><td><strong>Support<\/strong><\/td><\/tr><tr><td>{Rock, Jazz}<\/td><td>4<\/td><td>4\/8 = 0.5<\/td><\/tr><tr><td>{Rock, Pop}<\/td><td>4<\/td><td>4\/8 = 0.5<\/td><\/tr><tr><td>{Jazz, Pop}<\/td><td>4<\/td><td>4\/8 = 0.5<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Frequent 2-itemsets:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>{Rock, Jazz}, {Rock, Pop}, {Jazz, Pop}<br><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-prune-and-repeat\">Step 3: Prune and Repeat<\/h3>\n\n\n\n<p>Now, we generate 3-itemsets from the frequent 2-itemsets. We can only generate combinations from those 2-itemsets that have appeared frequently enough (those that pass the support threshold).<\/p>\n\n\n\n<p>Let's generate the 3-itemsets from the frequent 2-itemsets and calculate their support.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Itemset<\/strong><\/td><td><strong>Count<\/strong><\/td><td><strong>Support<\/strong><\/td><\/tr><tr><td>{Rock, Jazz, Pop}<\/td><td>3<\/td><td>3\/8 = 0.375<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Since the support for {Rock, Jazz, Pop} is less than the minimum support of 0.5, we <strong>prune<\/strong> this itemset.<\/p>\n\n\n\n<p>There are no more frequent 3-itemsets that meet the minimum support threshold.<\/p>\n\n\n\n<p><strong>Frequent Itemsets:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>{Rock}, {Jazz}, {Pop}<\/li>\n\n\n\n<li>{Rock, Jazz}, {Rock, Pop}, {Jazz, Pop}<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-generate-association-rules\">Step 4: Generate Association Rules<\/h3>\n\n\n\n<p>Now we generate association rules from the frequent itemsets. For example, let\u2019s create rules from the frequent 2-itemsets.<\/p>\n\n\n\n<p><strong>Rule Generation:<\/strong> We will focus on one rule: {Rock} \u2192 {Jazz}.<\/p>\n\n\n\n<p>To calculate the <strong>confidence<\/strong> and <strong>lift<\/strong> of the rule:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Confidence Formula<\/strong>:<\/li>\n<\/ul>\n\n\n<figure class=\"wp-block-image size-full zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/confidence-formuka.png\"><img decoding=\"async\" width=\"621\" height=\"65\" src=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/confidence-formuka.png\" alt=\"Confidence Formula\" class=\"wp-image-107485\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/confidence-formuka.png 621w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/confidence-formuka-300x31.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/confidence-formuka-150x16.png 150w\" sizes=\"(max-width: 621px) 100vw, 621px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Lift Formula<\/strong>:<\/li>\n<\/ul>\n\n\n<figure class=\"wp-block-image size-full zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/lift-formula.png\"><img decoding=\"async\" width=\"641\" height=\"65\" src=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/lift-formula.png\" alt=\"Lift Formula\" class=\"wp-image-107486\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/lift-formula.png 641w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/lift-formula-300x30.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/lift-formula-150x15.png 150w\" sizes=\"(max-width: 641px) 100vw, 641px\" \/><\/figure>\n\n\n\n<p>Let\u2019s calculate the confidence and lift for the rule {Rock} \u2192 {Jazz}.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Support({Rock, Jazz})<\/strong> = 4\/8 = 0.5<\/li>\n\n\n\n<li><strong>Support({Rock})<\/strong> = 5\/8 = 0.625<\/li>\n\n\n\n<li><strong>Support({Jazz})<\/strong> = 6\/8 = 0.75<\/li>\n<\/ol>\n\n\n\n<p><strong>Confidence({Rock} \u2192 {Jazz})<\/strong>:<\/p>\n\n\n\n<p>Confidence=0.50.625=0.8\\text{Confidence} = \\frac{0.5}{0.625} = 0.8Confidence=0.6250.5\u200b=0.8<\/p>\n\n\n\n<p><strong>Lift({Rock} \u2192 {Jazz})<\/strong>:<\/p>\n\n\n\n<p>Lift=0.80.75=1.07\\text{Lift} = \\frac{0.8}{0.75} = 1.07Lift=0.750.8\u200b=1.07<\/p>\n\n\n\n<p>This rule suggests that when a customer purchases Rock, there is an 80% chance they will also purchase Jazz, and the lift of 1.07 indicates that Rock and Jazz are slightly more likely to be bought together than by chance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"visualization-of-the-process\">Visualization of the Process<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Step<\/strong><\/td><td><strong>Itemsets Generated<\/strong><\/td><td><strong>Pruning \/ Filtering Result<\/strong><\/td><\/tr><tr><td><strong>Step 1<\/strong><\/td><td>{Rock}, {Jazz}, {Pop}, {Classical}<\/td><td>Prune {Classical} (Support &lt; 0.5)<\/td><\/tr><tr><td><strong>Step 2<\/strong><\/td><td>{Rock, Jazz}, {Rock, Pop}, {Jazz, Pop}<\/td><td>No pruning needed<\/td><\/tr><tr><td><strong>Step 3<\/strong><\/td><td>{Rock, Jazz, Pop}<\/td><td>Prune {Rock, Jazz, Pop} (Support &lt; 0.5)<\/td><\/tr><tr><td><strong>Step 4<\/strong> (Rule)<\/td><td>{Rock} \u2192 {Jazz}<\/td><td>Confidence = 0.8, Lift = 1.07<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This example highlights how to use the Apriori algorithm for association rule mining in a music dataset. Frequent itemsets are identified through support calculations, and rules are generated using confidence and lift to reveal associations between albums that are often bought together.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"apriori-algorithm-advantages-vs-disadvantages\">Apriori Algorithm: Advantages vs Disadvantages<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Advantages<\/strong><\/td><td><strong>Disadvantages<\/strong><\/td><\/tr><tr><td><strong>1. Easy to Understand and Implement: <\/strong>Follows a clear, step-by-step approach based on set theory.<\/td><td><strong>1. High Computational Cost<\/strong>: Needs multiple database scans, making it slow for large datasets.<\/td><\/tr><tr><td><strong>2. Intuitive Logic<\/strong>: Based on a natural concept of frequent itemsets and association rules.<\/td><td><strong>2. Generates Numerous Candidates<\/strong>: Can lead to an explosion of itemsets and memory usage.<\/td><\/tr><tr><td><strong>3. Interpretable Results<\/strong>: Produces human-readable rules that are easy to apply in decision-making.<\/td><td><strong>3. Requires Manual Thresholds<\/strong>: Setting appropriate support\/confidence values can be tricky.<\/td><\/tr><tr><td><strong>4. Ideal for Market Basket Analysis<\/strong>: Widely used in retail, e-commerce, and recommendation systems.<\/td><td><strong>4. Poor Performance on Dense\/High-Dimensional Data<\/strong>: Struggles when the data has many frequent patterns.<\/td><\/tr><tr><td><strong>5. Strong Foundation for Learning Concepts<\/strong>: Useful for teaching core data mining principles.<\/td><td><strong>5. Scalability Issues<\/strong>: Not suitable for real-time or massive-scale applications without optimisation.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"tips-for-efficient-use-of-the-apriori-algorithm\">Tips for Efficient Use of the Apriori Algorithm<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Set Proper Levels For Support And Confidence Parameters<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Select proper minimum support and confidence thresholds since they allow users to find significant patterns while managing processing requirements.<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Leverage the Apriori Property for Pruning<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Early elimination of candidate itemsets becomes possible through the understanding that all frequent itemsets require all of their subsets to be frequent, which reduces unnecessary computational costs.<\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Employ Hash-Based Techniques<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Hash-based counting of item set occurrences enables efficient support in reducing the number of candidate item sets.<\/p>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Apply Transaction Reduction Strategies<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Each pass should eliminate transactions that contain no frequent item sets in order to shrink the dataset size for the following rounds of processing.<\/p>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li><strong>Consider Alternative Algorithms for Large Datasets<\/strong><\/li>\n<\/ol>\n\n\n\n<p>When working with complex or voluminous data, it is advisable to use FP-Growth to avoid generating candidates and achieve superior performance.<\/p>\n\n\n\n<ol start=\"6\" class=\"wp-block-list\">\n<li><strong>Utilize Parallel Processing<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Using parallel computing technologies will minimise execution time when you deploy the algorithm to process big datasets.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>The Apriori algorithm is an essential data mining method that finds frequent item sets and associations in substantial datasets during market basket analysis.&nbsp;<\/p>\n\n\n\n<p>The system identifies relationships between different items to help organisations develop optimal strategies while making better business decisions.&nbsp;<\/p>\n\n\n\n<p>To deepen your understanding of such techniques and enhance your career in data science, consider exploring the <a href=\"https:\/\/www.mygreatlearning.com\/pg-program-data-science-and-business-analytics-course\">PG Program in Data Science<\/a> at Great Learning.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The article presents a clear breakdown of the algorithm structure while defining core elements, including key components, how it works, and practical transactional database examples for effective Apriori application.<\/p>\n","protected":false},"author":41,"featured_media":107484,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[9],"tags":[36863],"content_type":[],"class_list":["post-17307","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-science","tag-data-mining"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Apriori Algorithm: Key Concepts &amp; Examples Explained<\/title>\n<meta name=\"description\" content=\"Learn how the Apriori algorithm uncovers patterns in data mining, with examples of its use in market basket analysis.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apriori Algorithm in Data Mining with Examples\" \/>\n<meta property=\"og:description\" content=\"Learn how the Apriori algorithm uncovers patterns in data mining, with examples of its use in market basket analysis.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-20T06:43:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-14T12:37:18+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"Apriori Algorithm in Data Mining with Examples\",\"datePublished\":\"2020-07-20T06:43:40+00:00\",\"dateModified\":\"2025-05-14T12:37:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/\"},\"wordCount\":1827,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/apriori-algorithm.jpg\",\"keywords\":[\"data mining\"],\"articleSection\":[\"Data Science and Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/\",\"name\":\"Apriori Algorithm: Key Concepts & Examples Explained\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/apriori-algorithm.jpg\",\"datePublished\":\"2020-07-20T06:43:40+00:00\",\"dateModified\":\"2025-05-14T12:37:18+00:00\",\"description\":\"Learn how the Apriori algorithm uncovers patterns in data mining, with examples of its use in market basket analysis.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/apriori-algorithm.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/apriori-algorithm.jpg\",\"width\":1200,\"height\":628,\"caption\":\"Apriori Algorithm\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/apriori-algorithm-explained\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Data Science and Analytics\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-science\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Apriori Algorithm in Data Mining with Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Apriori Algorithm: Key Concepts & Examples Explained","description":"Learn how the Apriori algorithm uncovers patterns in data mining, with examples of its use in market basket analysis.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/","og_locale":"en_US","og_type":"article","og_title":"Apriori Algorithm in Data Mining with Examples","og_description":"Learn how the Apriori algorithm uncovers patterns in data mining, with examples of its use in market basket analysis.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2020-07-20T06:43:40+00:00","article_modified_time":"2025-05-14T12:37:18+00:00","og_image":[{"width":1200,"height":628,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"Apriori Algorithm in Data Mining with Examples","datePublished":"2020-07-20T06:43:40+00:00","dateModified":"2025-05-14T12:37:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/"},"wordCount":1827,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm.jpg","keywords":["data mining"],"articleSection":["Data Science and Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/","url":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/","name":"Apriori Algorithm: Key Concepts & Examples Explained","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm.jpg","datePublished":"2020-07-20T06:43:40+00:00","dateModified":"2025-05-14T12:37:18+00:00","description":"Learn how the Apriori algorithm uncovers patterns in data mining, with examples of its use in market basket analysis.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm.jpg","width":1200,"height":628,"caption":"Apriori Algorithm"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/apriori-algorithm-explained\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Data Science and Analytics","item":"https:\/\/www.mygreatlearning.com\/blog\/data-science\/"},{"@type":"ListItem","position":3,"name":"Apriori Algorithm in Data Mining with Examples"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm.jpg",1200,628,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm-300x157.jpg",300,157,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm-768x402.jpg",768,402,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm-1024x536.jpg",1024,536,true],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm.jpg",1200,628,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm.jpg",1200,628,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm-640x628.jpg",640,628,true],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm-96x96.jpg",96,96,true],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/apriori-algorithm-150x79.jpg",150,79,true]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"The article presents a clear breakdown of the algorithm structure while defining core elements, including key components, how it works, and practical transactional database examples for effective Apriori application.","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/17307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=17307"}],"version-history":[{"count":19,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/17307\/revisions"}],"predecessor-version":[{"id":107489,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/17307\/revisions\/107489"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/107484"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=17307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=17307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=17307"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=17307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}