SlideShare a Scribd company logo
1 of 16
Association Rule Mining
Ayesha Ali
Association Analysis
• Discovery of Association Rules
– showing attribute-value conditions that occur
frequently together in a set of data, e.g. market
basket
– Given a set of data, find rules that will predict the
occurrence of a data item based on the
occurrences of other items in the data
• A rule has the form body ⇒head
– buys(Omar, “milk”) ⇒ buys(Omar, “sugar”)
Association Analysis
Association Analysis
Location Business Type
1 Barber, Bakery, Convenience Store, Meat Shop, Fast Food
2 Bakery, Bookstore, Petrol Pump, Convenience Store, Library, Fast Food
3 Carpenter, Electrician, Barber, Hardware Store,
4 Bakery, Vegetable Market, Flower Shop, Sweets Shop, Meat Shop
5 Convenience Store, Hospital, Pharmacy, Sports Shop, Gym, Fast Food
6 Internet Café, Gym, Games Shop, Shorts Shop, Fast Food, Bakery
Association Rule: X Y ; (Fast Food, Bakery)  (Convenience Store)
Support S: Fraction of items that contain both X and Y = P(X U Y)
S(Fast Food, Bakery, Convenience Store) = 2/6 = .33
Confidence C: how often items in Y appear in locations that contain X = P(X U Y)
C[(Fast Food, Bakery)  (Convenience Store)] = P(X U Y) / P(X)
= 0.33/0.50 = .66
Association Analysis
• Given a set of transactions T, the goal of
association rule mining is to find all rules having
– support ≥ minsup threshold
– confidence ≥ minconf threshold
• Brute-force approach:
– List all possible association rules
– Compute the support and confidence for each rule
– Prune rules that fail the minsup and minconf
thresholds
⇒ Computationally prohibitive!
Association Analysis
Location Business Type
1 Barber, Bakery, Convenience Store, Meat Shop, Fast Food, Meat Shop
2 Bakery, Bookstore, Petrol Pump, Convenience Store, Library, Fast Food
3 Carpenter, Electrician, Barber, Hardware Store, Meat Shop
4 Bakery, Vegetable Market, Flower Shop, Sweets Shop, Meat Shop
5 Convenience Store, Hospital, Pharmacy, Sports Shop, Gym, Fast Food
6 Internet Café, Gym, Sweets Shop, Shorts Shop, Fast Food, Bakery
Association Rules:
(Fast Food, Bakery)  (Convenience Store) Support S: .33 Confidence C: .66
(Convenience Store, Bakery)  (Fast Food) Support S: .33 Confidence C: .50
(Fast Food, Convenience Store)  (Bakery) Support S: .33 Confidence C: .55
(Convenience Store)  (Fast Food, Bakery) Support S: .33 Confidence C: .66
(Fast Food)  (Convenience Store, Bakery) Support S: .33 Confidence C: 1
(Bakery)  (Fast Food, Convenience Store) Support S: .33 Confidence C: .66
Association Analysis
Association Rules:
(Fast Food, Bakery)  (Convenience Store) Support S: .33 Confidence C: .66
(Convenience Store, Bakery)  (Fast Food) Support S: .33 Confidence C: .50
(Fast Food, Convenience Store)  (Bakery) Support S: .33 Confidence C: .66
(Convenience Store)  (Fast Food, Bakery) Support S: .33 Confidence C: .66
(Fast Food)  (Convenience Store, Bakery) Support S: .33 Confidence C: 1
(Bakery)  (Fast Food, Convenience Store) Support S: .33 Confidence C: .66
Observations
 Above rules are binary partitions of given item set
 Identical Support but different Confidence
 Support and Confidence thresholds may be different
Mining Association Rules
• Two-step approach:
Step 1. Frequent Itemset Generation
Generate all itemsets whose support ≥ minsup
Step 2. Rule Generation
Generate high confidence rules from each frequent itemset,
where each rule is a binary partitioning of a frequent itemset
Note: Frequent itemset generation is still computationally expensive
Mining Association Rules
• Frequent Item Generation
Lattice Graph of possible item sets
Mining Association Rules
• Brute-force approach:
– Each node in the lattice graphs is a candidate frequent itemset
– Count the support of each candidate by scanning the database
– N = 6
– w = (Barber, Bakery, Convenience Store, Meat Shop, Fast Food, Bookstore, Petrol Pump, Library,
Carpenter, Electrician, Hardware Store, Vegetable Market, Flower Shop, Sweets Shop, Meat Shop,
Hospital, Pharmacy, Sports Shop, Gym, Internet Café) = 20
– M = 220 = 1048576
– Complexity ~ O (NMw)
Mining Association Rules
W Unique Items in Item set
Mining Association Rules
• Frequent Itemset Generation
– Reduce the number of candidates (M)
– Reduce the number of transactions/locations (N)
– Reduce the number of comparisons (NM)
• Use efficient data structures to store the candidates
• No need to match every candidate against every
transaction/location
Reducing the number of candidates
• Apriori principle:
– If an itemset is frequent, then all of its subsets must
also be frequent
• Important Support property:
– Support of an itemset never exceeds the support of its
subsets
– This is known as the anti-monotone property of
support
Reducing the number of candidates
Applying Apriori principle
Reducing the number of candidates
• N = 20
• All Possible candidate sets;
– NC1 + NC2 + NC3 + … + NCN
• Minimum Occurrence Based Filtering
Set m= 2 and L = 1
While (L < N){
Scan DB:
List = Create Occurrence Frequency Table of candidate sets of Length L
If no candidate in List then Break;
Filter all candidate sets with Occurrence Frequency < m
Create new candidate set of Length (L=L+1) from List
}
Filter Minimum Occurrences
m < 2
Reducing the number of candidates
Business Type Count
Barber 2
Bakery 2
Book tore 1
Carpenter 1
Convenience
Store
3
Electrician 1
Fast Food 3
Flower Shop 1
Gym 1
Games Shop 1
Hardware Store 1
Hospital 1
Internet Café 1
Library 1
Meat Shop 1
Petrol Pump 1
Pharmacy 1
Sports Shop 1
Sweets Shop 1
Vegetable Market 1
Business Type Count
Barber 2
Bakery 2
Convenience Store 3
Fast Food 3
Filter
Scan 1
Business Type Count
(Barber, Bakery) 1
(Barber, Convenience Store) 1
(Barber, Fast Food) 1
(Bakery, Convenience Store) 2
(Bakery, Fast Food) 3
(Convenience Store, Fast Food) 3
Pairs of Two Items; 4C2 = 6
Business Type Count
(Bakery, Convenience Store) 2
(Bakery, Fast Food) 3
(Convenience Store, Fast Food) 3
Filter Minimum Occurrences
m < 2
L1
L2

More Related Content

What's hot (20)

Assosiate rule mining
Assosiate rule miningAssosiate rule mining
Assosiate rule mining
 
Gradient descent method
Gradient descent methodGradient descent method
Gradient descent method
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AI
 
Random forest algorithm
Random forest algorithmRandom forest algorithm
Random forest algorithm
 
Random forest
Random forestRandom forest
Random forest
 
Decision tree and random forest
Decision tree and random forestDecision tree and random forest
Decision tree and random forest
 
Branch & bound
Branch & boundBranch & bound
Branch & bound
 
AI - Introduction to Bellman Equations
AI - Introduction to Bellman EquationsAI - Introduction to Bellman Equations
AI - Introduction to Bellman Equations
 
Decision Tree Learning
Decision Tree LearningDecision Tree Learning
Decision Tree Learning
 
Lecture optimal binary search tree
Lecture optimal binary search tree Lecture optimal binary search tree
Lecture optimal binary search tree
 
Data preprocessing in Machine learning
Data preprocessing in Machine learning Data preprocessing in Machine learning
Data preprocessing in Machine learning
 
K Nearest Neighbors
K Nearest NeighborsK Nearest Neighbors
K Nearest Neighbors
 
Minmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesMinmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slides
 
Stressen's matrix multiplication
Stressen's matrix multiplicationStressen's matrix multiplication
Stressen's matrix multiplication
 
Run time storage
Run time storageRun time storage
Run time storage
 
Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)
 
Reading Data into R
Reading Data into RReading Data into R
Reading Data into R
 
Deep neural networks
Deep neural networksDeep neural networks
Deep neural networks
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Data reduction
Data reductionData reduction
Data reduction
 

Viewers also liked

Data mining- Association Analysis -market basket
Data mining- Association Analysis -market basketData mining- Association Analysis -market basket
Data mining- Association Analysis -market basketSwapnil Soni
 
Machine Learning and Data Mining: 04 Association Rule Mining
Machine Learning and Data Mining: 04 Association Rule MiningMachine Learning and Data Mining: 04 Association Rule Mining
Machine Learning and Data Mining: 04 Association Rule MiningPier Luca Lanzi
 
Bord Pillar
Bord PillarBord Pillar
Bord PillarVR M
 
Fp growth algorithm
Fp growth algorithmFp growth algorithm
Fp growth algorithmPradip Kumar
 
The comparative study of apriori and FP-growth algorithm
The comparative study of apriori and FP-growth algorithmThe comparative study of apriori and FP-growth algorithm
The comparative study of apriori and FP-growth algorithmdeepti92pawar
 
Data mining fp growth
Data mining fp growthData mining fp growth
Data mining fp growthShihab Rahman
 
Association rule mining
Association rule miningAssociation rule mining
Association rule miningAcad
 
Multidimentional data model
Multidimentional data modelMultidimentional data model
Multidimentional data modeljagdish_93
 
Design of Bord and Pillar method in coal mines
Design of Bord and Pillar method in coal minesDesign of Bord and Pillar method in coal mines
Design of Bord and Pillar method in coal minesaashutosh chhirolya
 
DATA WAREHOUSING
DATA WAREHOUSINGDATA WAREHOUSING
DATA WAREHOUSINGKing Julian
 
Association Rule Mining with R
Association Rule Mining with RAssociation Rule Mining with R
Association Rule Mining with RYanchang Zhao
 

Viewers also liked (20)

Data Mining: Association Rules Basics
Data Mining: Association Rules BasicsData Mining: Association Rules Basics
Data Mining: Association Rules Basics
 
Data mining- Association Analysis -market basket
Data mining- Association Analysis -market basketData mining- Association Analysis -market basket
Data mining- Association Analysis -market basket
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
Lecture13 - Association Rules
Lecture13 - Association RulesLecture13 - Association Rules
Lecture13 - Association Rules
 
Machine Learning and Data Mining: 04 Association Rule Mining
Machine Learning and Data Mining: 04 Association Rule MiningMachine Learning and Data Mining: 04 Association Rule Mining
Machine Learning and Data Mining: 04 Association Rule Mining
 
Apriori
AprioriApriori
Apriori
 
Bord Pillar
Bord PillarBord Pillar
Bord Pillar
 
Chitwan sand mining
Chitwan sand miningChitwan sand mining
Chitwan sand mining
 
depllaring in coal mines
depllaring in coal minesdepllaring in coal mines
depllaring in coal mines
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
Fp growth algorithm
Fp growth algorithmFp growth algorithm
Fp growth algorithm
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
The comparative study of apriori and FP-growth algorithm
The comparative study of apriori and FP-growth algorithmThe comparative study of apriori and FP-growth algorithm
The comparative study of apriori and FP-growth algorithm
 
Data mining fp growth
Data mining fp growthData mining fp growth
Data mining fp growth
 
Association rule mining
Association rule miningAssociation rule mining
Association rule mining
 
Multidimentional data model
Multidimentional data modelMultidimentional data model
Multidimentional data model
 
Design of Bord and Pillar method in coal mines
Design of Bord and Pillar method in coal minesDesign of Bord and Pillar method in coal mines
Design of Bord and Pillar method in coal mines
 
Mining ppt 2014
Mining ppt 2014Mining ppt 2014
Mining ppt 2014
 
DATA WAREHOUSING
DATA WAREHOUSINGDATA WAREHOUSING
DATA WAREHOUSING
 
Association Rule Mining with R
Association Rule Mining with RAssociation Rule Mining with R
Association Rule Mining with R
 

Similar to Association Rule Mining in Data Mining

DM -Unit 2-PPT.ppt
DM -Unit 2-PPT.pptDM -Unit 2-PPT.ppt
DM -Unit 2-PPT.pptraju980973
 
Rules of data mining
Rules of data miningRules of data mining
Rules of data miningSulman Ahmed
 
Lect6 Association rule & Apriori algorithm
Lect6 Association rule & Apriori algorithmLect6 Association rule & Apriori algorithm
Lect6 Association rule & Apriori algorithmhktripathy
 
Lec6_Association.ppt
Lec6_Association.pptLec6_Association.ppt
Lec6_Association.pptprema370155
 
AssociationRule.pdf
AssociationRule.pdfAssociationRule.pdf
AssociationRule.pdfWailaBaba
 
MODULE 5 _ Mining frequent patterns and associations.pptx
MODULE 5 _ Mining frequent patterns and associations.pptxMODULE 5 _ Mining frequent patterns and associations.pptx
MODULE 5 _ Mining frequent patterns and associations.pptxnikshaikh786
 
Association 04.03.14
Association   04.03.14Association   04.03.14
Association 04.03.14rahulmath80
 
Apriori and Eclat algorithm in Association Rule Mining
Apriori and Eclat algorithm in Association Rule MiningApriori and Eclat algorithm in Association Rule Mining
Apriori and Eclat algorithm in Association Rule MiningWan Aezwani Wab
 
UNIT 3.2 -Mining Frquent Patterns (part1).ppt
UNIT 3.2 -Mining Frquent Patterns (part1).pptUNIT 3.2 -Mining Frquent Patterns (part1).ppt
UNIT 3.2 -Mining Frquent Patterns (part1).pptRaviKiranVarma4
 
Dr. Stephen Koontz - Thinning Cash Fed Cattle Trade: How Thin is Too Thin & W...
Dr. Stephen Koontz - Thinning Cash Fed Cattle Trade: How Thin is Too Thin & W...Dr. Stephen Koontz - Thinning Cash Fed Cattle Trade: How Thin is Too Thin & W...
Dr. Stephen Koontz - Thinning Cash Fed Cattle Trade: How Thin is Too Thin & W...John Blue
 
Mining Frequent Patterns And Association Rules
Mining Frequent Patterns And Association RulesMining Frequent Patterns And Association Rules
Mining Frequent Patterns And Association RulesRashmi Bhat
 
What goes with what (Market Basket Analysis)
What goes with what (Market Basket Analysis)What goes with what (Market Basket Analysis)
What goes with what (Market Basket Analysis)Kumar P
 

Similar to Association Rule Mining in Data Mining (15)

Data mining arm-2009-v0
Data mining arm-2009-v0Data mining arm-2009-v0
Data mining arm-2009-v0
 
DM -Unit 2-PPT.ppt
DM -Unit 2-PPT.pptDM -Unit 2-PPT.ppt
DM -Unit 2-PPT.ppt
 
Rules of data mining
Rules of data miningRules of data mining
Rules of data mining
 
Lect6 Association rule & Apriori algorithm
Lect6 Association rule & Apriori algorithmLect6 Association rule & Apriori algorithm
Lect6 Association rule & Apriori algorithm
 
Lec6_Association.ppt
Lec6_Association.pptLec6_Association.ppt
Lec6_Association.ppt
 
AssociationRule.pdf
AssociationRule.pdfAssociationRule.pdf
AssociationRule.pdf
 
MODULE 5 _ Mining frequent patterns and associations.pptx
MODULE 5 _ Mining frequent patterns and associations.pptxMODULE 5 _ Mining frequent patterns and associations.pptx
MODULE 5 _ Mining frequent patterns and associations.pptx
 
Association 04.03.14
Association   04.03.14Association   04.03.14
Association 04.03.14
 
Apriori and Eclat algorithm in Association Rule Mining
Apriori and Eclat algorithm in Association Rule MiningApriori and Eclat algorithm in Association Rule Mining
Apriori and Eclat algorithm in Association Rule Mining
 
UNIT 3.2 -Mining Frquent Patterns (part1).ppt
UNIT 3.2 -Mining Frquent Patterns (part1).pptUNIT 3.2 -Mining Frquent Patterns (part1).ppt
UNIT 3.2 -Mining Frquent Patterns (part1).ppt
 
apriori.pptx
apriori.pptxapriori.pptx
apriori.pptx
 
Dr. Stephen Koontz - Thinning Cash Fed Cattle Trade: How Thin is Too Thin & W...
Dr. Stephen Koontz - Thinning Cash Fed Cattle Trade: How Thin is Too Thin & W...Dr. Stephen Koontz - Thinning Cash Fed Cattle Trade: How Thin is Too Thin & W...
Dr. Stephen Koontz - Thinning Cash Fed Cattle Trade: How Thin is Too Thin & W...
 
Mining Frequent Patterns And Association Rules
Mining Frequent Patterns And Association RulesMining Frequent Patterns And Association Rules
Mining Frequent Patterns And Association Rules
 
BAS 250 Lecture 4
BAS 250 Lecture 4BAS 250 Lecture 4
BAS 250 Lecture 4
 
What goes with what (Market Basket Analysis)
What goes with what (Market Basket Analysis)What goes with what (Market Basket Analysis)
What goes with what (Market Basket Analysis)
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

Association Rule Mining in Data Mining

  • 2. Association Analysis • Discovery of Association Rules – showing attribute-value conditions that occur frequently together in a set of data, e.g. market basket – Given a set of data, find rules that will predict the occurrence of a data item based on the occurrences of other items in the data • A rule has the form body ⇒head – buys(Omar, “milk”) ⇒ buys(Omar, “sugar”)
  • 4. Association Analysis Location Business Type 1 Barber, Bakery, Convenience Store, Meat Shop, Fast Food 2 Bakery, Bookstore, Petrol Pump, Convenience Store, Library, Fast Food 3 Carpenter, Electrician, Barber, Hardware Store, 4 Bakery, Vegetable Market, Flower Shop, Sweets Shop, Meat Shop 5 Convenience Store, Hospital, Pharmacy, Sports Shop, Gym, Fast Food 6 Internet Café, Gym, Games Shop, Shorts Shop, Fast Food, Bakery Association Rule: X Y ; (Fast Food, Bakery)  (Convenience Store) Support S: Fraction of items that contain both X and Y = P(X U Y) S(Fast Food, Bakery, Convenience Store) = 2/6 = .33 Confidence C: how often items in Y appear in locations that contain X = P(X U Y) C[(Fast Food, Bakery)  (Convenience Store)] = P(X U Y) / P(X) = 0.33/0.50 = .66
  • 5. Association Analysis • Given a set of transactions T, the goal of association rule mining is to find all rules having – support ≥ minsup threshold – confidence ≥ minconf threshold • Brute-force approach: – List all possible association rules – Compute the support and confidence for each rule – Prune rules that fail the minsup and minconf thresholds ⇒ Computationally prohibitive!
  • 6. Association Analysis Location Business Type 1 Barber, Bakery, Convenience Store, Meat Shop, Fast Food, Meat Shop 2 Bakery, Bookstore, Petrol Pump, Convenience Store, Library, Fast Food 3 Carpenter, Electrician, Barber, Hardware Store, Meat Shop 4 Bakery, Vegetable Market, Flower Shop, Sweets Shop, Meat Shop 5 Convenience Store, Hospital, Pharmacy, Sports Shop, Gym, Fast Food 6 Internet Café, Gym, Sweets Shop, Shorts Shop, Fast Food, Bakery Association Rules: (Fast Food, Bakery)  (Convenience Store) Support S: .33 Confidence C: .66 (Convenience Store, Bakery)  (Fast Food) Support S: .33 Confidence C: .50 (Fast Food, Convenience Store)  (Bakery) Support S: .33 Confidence C: .55 (Convenience Store)  (Fast Food, Bakery) Support S: .33 Confidence C: .66 (Fast Food)  (Convenience Store, Bakery) Support S: .33 Confidence C: 1 (Bakery)  (Fast Food, Convenience Store) Support S: .33 Confidence C: .66
  • 7. Association Analysis Association Rules: (Fast Food, Bakery)  (Convenience Store) Support S: .33 Confidence C: .66 (Convenience Store, Bakery)  (Fast Food) Support S: .33 Confidence C: .50 (Fast Food, Convenience Store)  (Bakery) Support S: .33 Confidence C: .66 (Convenience Store)  (Fast Food, Bakery) Support S: .33 Confidence C: .66 (Fast Food)  (Convenience Store, Bakery) Support S: .33 Confidence C: 1 (Bakery)  (Fast Food, Convenience Store) Support S: .33 Confidence C: .66 Observations  Above rules are binary partitions of given item set  Identical Support but different Confidence  Support and Confidence thresholds may be different
  • 8. Mining Association Rules • Two-step approach: Step 1. Frequent Itemset Generation Generate all itemsets whose support ≥ minsup Step 2. Rule Generation Generate high confidence rules from each frequent itemset, where each rule is a binary partitioning of a frequent itemset Note: Frequent itemset generation is still computationally expensive
  • 9. Mining Association Rules • Frequent Item Generation Lattice Graph of possible item sets
  • 10. Mining Association Rules • Brute-force approach: – Each node in the lattice graphs is a candidate frequent itemset – Count the support of each candidate by scanning the database – N = 6 – w = (Barber, Bakery, Convenience Store, Meat Shop, Fast Food, Bookstore, Petrol Pump, Library, Carpenter, Electrician, Hardware Store, Vegetable Market, Flower Shop, Sweets Shop, Meat Shop, Hospital, Pharmacy, Sports Shop, Gym, Internet Café) = 20 – M = 220 = 1048576 – Complexity ~ O (NMw)
  • 11. Mining Association Rules W Unique Items in Item set
  • 12. Mining Association Rules • Frequent Itemset Generation – Reduce the number of candidates (M) – Reduce the number of transactions/locations (N) – Reduce the number of comparisons (NM) • Use efficient data structures to store the candidates • No need to match every candidate against every transaction/location
  • 13. Reducing the number of candidates • Apriori principle: – If an itemset is frequent, then all of its subsets must also be frequent • Important Support property: – Support of an itemset never exceeds the support of its subsets – This is known as the anti-monotone property of support
  • 14. Reducing the number of candidates Applying Apriori principle
  • 15. Reducing the number of candidates • N = 20 • All Possible candidate sets; – NC1 + NC2 + NC3 + … + NCN • Minimum Occurrence Based Filtering Set m= 2 and L = 1 While (L < N){ Scan DB: List = Create Occurrence Frequency Table of candidate sets of Length L If no candidate in List then Break; Filter all candidate sets with Occurrence Frequency < m Create new candidate set of Length (L=L+1) from List }
  • 16. Filter Minimum Occurrences m < 2 Reducing the number of candidates Business Type Count Barber 2 Bakery 2 Book tore 1 Carpenter 1 Convenience Store 3 Electrician 1 Fast Food 3 Flower Shop 1 Gym 1 Games Shop 1 Hardware Store 1 Hospital 1 Internet Café 1 Library 1 Meat Shop 1 Petrol Pump 1 Pharmacy 1 Sports Shop 1 Sweets Shop 1 Vegetable Market 1 Business Type Count Barber 2 Bakery 2 Convenience Store 3 Fast Food 3 Filter Scan 1 Business Type Count (Barber, Bakery) 1 (Barber, Convenience Store) 1 (Barber, Fast Food) 1 (Bakery, Convenience Store) 2 (Bakery, Fast Food) 3 (Convenience Store, Fast Food) 3 Pairs of Two Items; 4C2 = 6 Business Type Count (Bakery, Convenience Store) 2 (Bakery, Fast Food) 3 (Convenience Store, Fast Food) 3 Filter Minimum Occurrences m < 2 L1 L2