SlideShare a Scribd company logo
Association rule
What is association rule in data mining
• Association rules are a fundamental concept in data mining that help uncover
interesting relationships or patterns within large datasets.
• They are often used to identify associations, correlations, or co-occurrences
between items or attributes in a dataset.
• Association rule mining is particularly useful for market basket analysis, where it
helps discover relationships between items that are frequently purchased together.
• In association rule mining, the most common metric used is support, confidence,
and lift:
1.Support: This measures the frequency of occurrence of an itemset in the dataset.
It indicates how often a specific combination of items appears together.
2.Confidence: Confidence measures how often a rule is true. It is calculated as the
ratio of the support of the combined itemset to the support of the antecedent (the
items on the left side of the rule).
3.Lift: Lift measures how much more likely the items in the rule are to be bought
together than if they were purchased independently. It compares the actual support
of the combined itemset to what would be expected if the items were independent.
What is apriori algorithm
• The Apriori algorithm is a popular and fundamental algorithm in data
mining and association rule learning. It's used to discover frequent
itemsets within a dataset and generate association rules based on these
itemsets.
• The Apriori algorithm is widely used for market basket analysis and
other scenarios where discovering associations between items is
important
Market Basket Analysis
• Market basket analysis is a data mining technique used to uncover patterns in customer purchasing
behavior. It analyzes the co-occurrence of items in transactions to determine associations between
products. For example, it can reveal that customers who buy bread are also likely to buy butter,
which helps retailers in various ways, such as:
1.Cross-Selling Opportunities: Identifying which products are often bought together can help in
placing complementary items near each other or bundling them in promotions.
2.Inventory Management: Understanding product associations can help in stocking and managing
inventory more effectively.
3.Personalized Marketing: Insights from market basket analysis can be used to create targeted
marketing campaigns based on purchase patterns.
4.Store Layout Optimization: Retailers can arrange their store layout based on item associations to
encourage more purchases.
• Techniques commonly used in market basket analysis include association rule learning, with
algorithms like Apriori and FP-Growth, which generate rules like "If a customer buys X, they are
likely to buy Y."
• Here's how the Apriori algorithm generally works:
1.Generate Frequent Itemsets: The algorithm starts by finding all the frequent
individual items (itemsets of size 1) in the dataset. A frequent itemset is one that
meets a predefined minimum support threshold, indicating how frequently an
itemset appears in the dataset.
2.Join Step: The algorithm then generates candidate itemsets of size 2 by joining
pairs of frequent items found in the previous step.
3.Prune Step: The algorithm prunes candidate itemsets that contain subsets that are
not frequent (based on the Apriori property). This pruning reduces the search space.
4.Repeat: Steps 2 and 3 are repeated iteratively to generate candidate itemsets of
increasing size and prune them based on their subsets' frequency until no more
frequent itemsets can be found.
5.Generate Association Rules: From the final set of frequent itemsets, association
rules are generated by considering possible combinations of antecedents and
consequents, and calculating their confidence and support.
Flowchart for Apriori Algorithm
Pseudocode for apriori algorithm
Association rule introduction, Market basket Analysis
30
60
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Association rule introduction, Market basket Analysis
Advantages of association rule
• It can be used to find hidden patterns in data. Association rule mining can identify
relationships between items that would not be obvious by simply looking at the data
• It can be used to make predictions. Association rule mining can be used to predict
which items are likely to be purchased together. This information can be used to
improve customer targeting, product placement, and marketing campaigns.
• It can be used to improve decision making. Association rule mining can be used to
identify which products are most popular, which customers are most likely to buy a
particular product, and which products are likely to be purchased together. This
information can be used to make better decisions about product development, pricing,
and promotion.
• It can be used to improve customer service. Association rule mining can be used to
identify which customers are most likely to be dissatisfied with a product or service.
This information can be used to improve customer service and prevent customer churn.
Applications of association rule
• Retail: Retailers use association rule mining to find patterns in customer purchase data. This
information can be used to improve product placement, target marketing campaigns, and
develop new products.
• E-commerce: E-commerce websites use association rule mining to recommend products to
customers. This information can help customers find the products they are looking for and
increase sales.
• Healthcare: Healthcare providers use association rule mining to find patterns in medical
records. This information can be used to improve diagnosis and treatment of diseases.
• Fraud detection: Financial institutions use association rule mining to detect fraud. This
information can help them prevent fraud and protect their customers.
• Social media: Social media platforms use association rule mining to find patterns in user
behavior. This information can be used to improve the user experience and target
advertising.
Limitations of association rule
• Spurious rules: Association rule mining can find rules that are not actually meaningful. This is because the
algorithm does not take into account the causal relationships between items. For example, the rule "people who
buy diapers are also likely to buy beer" may be true, but it does not mean that buying diapers causes people to buy
beer.
• Too many rules: Association rule mining can generate a large number of rules, many of which are not interesting
or useful. This can make it difficult to find the rules that are actually meaningful.
• Sensitive to parameters: The results of association rule mining can be sensitive to the parameters that are used,
such as the minimum support and confidence thresholds. This means that the results can change significantly if the
parameters are changed.
• Cannot handle noise: Association rule mining can be sensitive to noise in the data. This means that the results
can be inaccurate if the data contains errors or outliers.
• Cannot handle continuous data: Association rule mining is typically used for discrete data, such as customer
purchase data. It cannot be used for continuous data, such as prices or weights.

More Related Content

PPTX
Unit 4_ML.pptx
PDF
PROJECT-109,93.pdf data miiining project
PPTX
Association Rule Mining with Apriori Algorithm.pptx
PPTX
Association rule mining and Apriori algorithm
PPTX
big data seminar.pptx
PPTX
Fundamental of Data Science BCA 6th Sem Notes
PPTX
Fundamental of Data Science BCA 6th Sem ppt
Unit 4_ML.pptx
PROJECT-109,93.pdf data miiining project
Association Rule Mining with Apriori Algorithm.pptx
Association rule mining and Apriori algorithm
big data seminar.pptx
Fundamental of Data Science BCA 6th Sem Notes
Fundamental of Data Science BCA 6th Sem ppt

Similar to Association rule introduction, Market basket Analysis (20)

PPTX
Fundamental of Data Science BCA 6th Sem Notes
PPTX
Market Basket Analysis
PDF
Paper id 212014126
PDF
Data Mining For Supermarket Sale Analysis Using Association Rule
PPTX
Mining Association Rules in Large Database
PPTX
WEEK 11 - Association Mining_020520.pptx
PDF
A literature review of modern association rule mining techniques
PPTX
Association Analysis
PPTX
Association Analysis
PPTX
Association Analysis
PPTX
MODULE 5 _ Mining frequent patterns and associations.pptx
PPTX
Presentation on the topic of association rule mining
PPTX
Association Rules in Machine Learning
PDF
DATA MINING-MODULE II NOTES(S4 BCA)_________.pdf
PPTX
Market Basket Analysis
PPTX
1.pptx .
PDF
Reducing the gap between Consumer and Retailer using Association Rule Mining ...
PDF
IRJET- Minning Frequent Patterns,Associations and Correlations
PDF
Data Mining Module 4 Business Analytics.pdf
PDF
Comparative Study of Improved Association Rules Mining Based On Shopping System
Fundamental of Data Science BCA 6th Sem Notes
Market Basket Analysis
Paper id 212014126
Data Mining For Supermarket Sale Analysis Using Association Rule
Mining Association Rules in Large Database
WEEK 11 - Association Mining_020520.pptx
A literature review of modern association rule mining techniques
Association Analysis
Association Analysis
Association Analysis
MODULE 5 _ Mining frequent patterns and associations.pptx
Presentation on the topic of association rule mining
Association Rules in Machine Learning
DATA MINING-MODULE II NOTES(S4 BCA)_________.pdf
Market Basket Analysis
1.pptx .
Reducing the gap between Consumer and Retailer using Association Rule Mining ...
IRJET- Minning Frequent Patterns,Associations and Correlations
Data Mining Module 4 Business Analytics.pdf
Comparative Study of Improved Association Rules Mining Based On Shopping System
Ad

More from SherinRappai (20)

PPTX
Shells commands, file structure, directory structure.pptx
PPTX
Shell Programming Language in Operating System .pptx
PPTX
Types of NoSql Database available.pptx
PPTX
Introduction to NoSQL & Features of NoSQL.pptx
PPTX
Clustering, Types of clustering, Types of data
PPTX
Introduction to Internet, Domain Name System
PPTX
Cascading style sheet, CSS Box model, Table in CSS
PPTX
Numpy in python, Array operations using numpy and so on
PPTX
Functions in python, types of functions in python
PPTX
Extensible markup language ppt as part of Internet Technology
PPTX
Java script ppt from students in internet technology
PPTX
Building Competency and Career in the Open Source World
PPTX
How to Build a Career in Open Source.pptx
PPTX
Issues in Knowledge representation for students
PPTX
A* algorithm of Artificial Intelligence for BCA students
PPTX
Unit 2.pptx
PPTX
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
PPTX
Clustering.pptx
PPTX
neuralnetwork.pptx
PPTX
Rendering Algorithms.pptx
Shells commands, file structure, directory structure.pptx
Shell Programming Language in Operating System .pptx
Types of NoSql Database available.pptx
Introduction to NoSQL & Features of NoSQL.pptx
Clustering, Types of clustering, Types of data
Introduction to Internet, Domain Name System
Cascading style sheet, CSS Box model, Table in CSS
Numpy in python, Array operations using numpy and so on
Functions in python, types of functions in python
Extensible markup language ppt as part of Internet Technology
Java script ppt from students in internet technology
Building Competency and Career in the Open Source World
How to Build a Career in Open Source.pptx
Issues in Knowledge representation for students
A* algorithm of Artificial Intelligence for BCA students
Unit 2.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
Clustering.pptx
neuralnetwork.pptx
Rendering Algorithms.pptx
Ad

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
cuic standard and advanced reporting.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Review of recent advances in non-invasive hemoglobin estimation
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Electronic commerce courselecture one. Pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
A Presentation on Artificial Intelligence
NewMind AI Weekly Chronicles - August'25 Week I
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx
Approach and Philosophy of On baking technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Review of recent advances in non-invasive hemoglobin estimation
The AUB Centre for AI in Media Proposal.docx
“AI and Expert System Decision Support & Business Intelligence Systems”
Electronic commerce courselecture one. Pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
A Presentation on Artificial Intelligence

Association rule introduction, Market basket Analysis

  • 2. What is association rule in data mining • Association rules are a fundamental concept in data mining that help uncover interesting relationships or patterns within large datasets. • They are often used to identify associations, correlations, or co-occurrences between items or attributes in a dataset. • Association rule mining is particularly useful for market basket analysis, where it helps discover relationships between items that are frequently purchased together.
  • 3. • In association rule mining, the most common metric used is support, confidence, and lift: 1.Support: This measures the frequency of occurrence of an itemset in the dataset. It indicates how often a specific combination of items appears together. 2.Confidence: Confidence measures how often a rule is true. It is calculated as the ratio of the support of the combined itemset to the support of the antecedent (the items on the left side of the rule). 3.Lift: Lift measures how much more likely the items in the rule are to be bought together than if they were purchased independently. It compares the actual support of the combined itemset to what would be expected if the items were independent.
  • 4. What is apriori algorithm • The Apriori algorithm is a popular and fundamental algorithm in data mining and association rule learning. It's used to discover frequent itemsets within a dataset and generate association rules based on these itemsets. • The Apriori algorithm is widely used for market basket analysis and other scenarios where discovering associations between items is important
  • 5. Market Basket Analysis • Market basket analysis is a data mining technique used to uncover patterns in customer purchasing behavior. It analyzes the co-occurrence of items in transactions to determine associations between products. For example, it can reveal that customers who buy bread are also likely to buy butter, which helps retailers in various ways, such as: 1.Cross-Selling Opportunities: Identifying which products are often bought together can help in placing complementary items near each other or bundling them in promotions. 2.Inventory Management: Understanding product associations can help in stocking and managing inventory more effectively. 3.Personalized Marketing: Insights from market basket analysis can be used to create targeted marketing campaigns based on purchase patterns. 4.Store Layout Optimization: Retailers can arrange their store layout based on item associations to encourage more purchases. • Techniques commonly used in market basket analysis include association rule learning, with algorithms like Apriori and FP-Growth, which generate rules like "If a customer buys X, they are likely to buy Y."
  • 6. • Here's how the Apriori algorithm generally works: 1.Generate Frequent Itemsets: The algorithm starts by finding all the frequent individual items (itemsets of size 1) in the dataset. A frequent itemset is one that meets a predefined minimum support threshold, indicating how frequently an itemset appears in the dataset. 2.Join Step: The algorithm then generates candidate itemsets of size 2 by joining pairs of frequent items found in the previous step. 3.Prune Step: The algorithm prunes candidate itemsets that contain subsets that are not frequent (based on the Apriori property). This pruning reduces the search space. 4.Repeat: Steps 2 and 3 are repeated iteratively to generate candidate itemsets of increasing size and prune them based on their subsets' frequency until no more frequent itemsets can be found. 5.Generate Association Rules: From the final set of frequent itemsets, association rules are generated by considering possible combinations of antecedents and consequents, and calculating their confidence and support.
  • 10. 30 60
  • 31. Advantages of association rule • It can be used to find hidden patterns in data. Association rule mining can identify relationships between items that would not be obvious by simply looking at the data • It can be used to make predictions. Association rule mining can be used to predict which items are likely to be purchased together. This information can be used to improve customer targeting, product placement, and marketing campaigns. • It can be used to improve decision making. Association rule mining can be used to identify which products are most popular, which customers are most likely to buy a particular product, and which products are likely to be purchased together. This information can be used to make better decisions about product development, pricing, and promotion. • It can be used to improve customer service. Association rule mining can be used to identify which customers are most likely to be dissatisfied with a product or service. This information can be used to improve customer service and prevent customer churn.
  • 32. Applications of association rule • Retail: Retailers use association rule mining to find patterns in customer purchase data. This information can be used to improve product placement, target marketing campaigns, and develop new products. • E-commerce: E-commerce websites use association rule mining to recommend products to customers. This information can help customers find the products they are looking for and increase sales. • Healthcare: Healthcare providers use association rule mining to find patterns in medical records. This information can be used to improve diagnosis and treatment of diseases. • Fraud detection: Financial institutions use association rule mining to detect fraud. This information can help them prevent fraud and protect their customers. • Social media: Social media platforms use association rule mining to find patterns in user behavior. This information can be used to improve the user experience and target advertising.
  • 33. Limitations of association rule • Spurious rules: Association rule mining can find rules that are not actually meaningful. This is because the algorithm does not take into account the causal relationships between items. For example, the rule "people who buy diapers are also likely to buy beer" may be true, but it does not mean that buying diapers causes people to buy beer. • Too many rules: Association rule mining can generate a large number of rules, many of which are not interesting or useful. This can make it difficult to find the rules that are actually meaningful. • Sensitive to parameters: The results of association rule mining can be sensitive to the parameters that are used, such as the minimum support and confidence thresholds. This means that the results can change significantly if the parameters are changed. • Cannot handle noise: Association rule mining can be sensitive to noise in the data. This means that the results can be inaccurate if the data contains errors or outliers. • Cannot handle continuous data: Association rule mining is typically used for discrete data, such as customer purchase data. It cannot be used for continuous data, such as prices or weights.

Editor's Notes

  • #3: Leverage : Statistical measure that indicates how often a given itemset occurs than would be expected by chance. Conviction : Helps to assess the strength and significance of an association between the items in a dataset. It is useful for identifying in cases where the presence of one item significantly effects the absence of another item
  • #8: In the Apriori algorithm, a frequent itemset is an itemset that appears in at least a minimum support number of transactions. The minimum support is a user-defined threshold that determines how frequently an itemset must appear in order to be considered frequent. The Apriori algorithm works by iteratively generating candidate itemsets and then counting the number of times each candidate itemset appears in the transactions. The candidate itemsets are generated using the Apriori property, which states that if an itemset is not frequent, then none of its supersets can be frequent. The Apriori algorithm starts by generating the candidate itemsets of size 1. These are simply the individual items in the data set. The candidate itemsets of size 2 are generated by joining pairs of candidate itemsets of size 1. The candidate itemsets of size 3 are generated by joining pairs of candidate itemsets of size 2, and so on. The candidate itemsets are then evaluated for support. If a candidate itemset has a support count that is greater than or equal to the minimum support threshold, then it is considered a frequent itemset. The Apriori algorithm terminates when there are no more candidate itemsets to generate.