SlideShare a Scribd company logo
1 of 17
Association Rule
Mining
Hello!
I AM IFFAT FIROZY
I am here because I love to teach.
You can find me at ifirozy@gmail.com
2
Introduction1
3
“
Association rules are if-then statements that help
to show the probability of relationships
between data items within large data sets in
various types of databases. Association rule
mining has a number of applications and is
widely used to help discover sales correlations
in transactional data or in medical data sets.
4
BASIC CONCEPT
5
TID ITEMS
1 Bread, Milk
2 Bread, Diaper, Beer, Eggs
3 Milk, Diaper, Beer, Coke
4 Bread, Milk, Diaper, Beer
5 Bread, Milk, Diaper, Coke
Basic Concepts
Support count(𝜎): frequency of occurrence of a
itemset. Here σ({Milk, Bread, Diaper})=2
Frequent itemset: An itemset whose support is
greater than or equal to minusp threshold.
Association rule: X →Y, where X and Y are
nonoverlapping itemset.
Example: {Milk, Diaper}->{Beer}
6
Basic Concepts
Support(s): The number of transactions that
include items in the {X} and {Y} parts of the
rule as a percentage of the total number of
transaction. It is a measure of how
frequently the collection of items occur
together as a percentage of all
transactions.
It is interpreted as fraction of transactions that contain
both X and Y.
From the above table, {Milk, Diaper}
→{Beer}
S= 𝛔(X+Y) / total
= 𝝈 ({Milk, Diaper, Beer}) / |T| = 2/5 = 0.4
7
TID ITEMS
1 Bread, Milk
2 Bread, Diaper, Beer, Eggs
3 Milk, Diaper, Beer, Coke
4 Bread, Milk, Diaper, Beer
5 Bread, Milk, Diaper, Coke
Confidence(c): It is the ratio of the no
of transactions that includes all items
in {B} as well as the no of transactions
that includes all items in {A} to the no
of transactions that includes all items
in {A}.
It measures how often each item in Y appears in
transactions that contains items in X also.
From the above table, {Milk, Diaper}
→{Beer}
confidence(X →Y) = support(X ∪ Y) / support(X)
c= σ (Milk, Diaper, Beer)/σ (Milk, Diaper)
= 2/3 = 0.67
Basic concept
8
TID ITEMS
1 Bread, Milk
2 Bread, Diaper, Beer, Eggs
3 Milk, Diaper, Beer, Coke
4 Bread, Milk, Diaper, Beer
5 Bread, Milk, Diaper, Coke
Lift(l): The lift of the rule X=>Y is the
confidence of the rule divided by the
expected confidence, assuming that the
itemsets X and Y are independent of each
other. The expected confidence is the
confidence divided by the frequency of {Y}
Lift value near 1 indicates X and Y almost often appear
together as expected, greater than 1 means they appear
together more than expected and less than 1 means they
appear less than expected. Greater lift values indicate
stronger association.
lift(X →Y) = confidence (X →Y) / support(Y)
l= σ({Milk, Diaper, Beer})/ σ({Milk,
Diaper})* σ({Beer})
= 0.4/(0.6*0.6) = 1.11
Basic concept
9
TID ITEMS
1 Bread, Milk
2 Bread, Diaper, Beer, Eggs
3 Milk, Diaper, Beer, Coke
4 Bread, Milk, Diaper, Beer
5 Bread, Milk, Diaper, Coke
PROBLEM
How many itemsets are
there?
-Given n items, there are 2n
possible itemsets
10
APRIORI ALGORITHM
11
Apriori Algorithm
All non-empty subset of frequent itemset must be
frequent. The key concept of Apriori algorithm is its
anti-monotonicity of support measure. Apriori
assumes that
‘’All subsets of a frequent itemset must be
frequent(Apriori property).
If an itemset is infrequent, all its supersets will be
infrequent.’’
12
TID ITEMS
1 I1,I2,I5
2 I2,I4
3 I2,I3
4 I1,I2,I4
5 I1,I3
6 I2,I3
7 I1,I3
8 I1,I2,I3,I5
9 I1,I2,I3
-minimum support
count is 2
-minimum
confidence is 50%
STEP 1
13
1) Create a table
containing support
count of each item
present in dataset –
Called C1(candidate set)
ITEMS SUPPORT
COUNT
I1 6
I2 7
I3 6
I4 2
I5 2
TID ITEMS
1 I1,I2,I5
2 I2,I4
3 I2,I3
4 I1,I2,I4
5 I1,I3
6 I2,I3
7 I1,I3
8 I1,I2,I3,I5
9 I1,I2,I3
ITEMS SUPPORT
COUNT
I1 6
I2 7
I3 6
I4 2
I5 2
C1L1
2) compare candidate set item’s
support count with minimum
support count(here
min_support=2 if support count
of candidate set items is less
than min_support then remove
those items). This gives us
itemset L1.
STEP 2
14
ITEMS SUPPORT
COUNT
I1,12 6
I1,I3 7
I1,14 6
I1,15 2
I2,I3 2
I2,I4 2
I2,I5 2
I3,I4 0
I3,I5 1
I4,I5 0
TID ITEMS
1 I1,I2,I5
2 I2,I4
3 I2,I3
4 I1,I2,I4
5 I1,I3
6 I2,I3
7 I1,I3
8 I1,I2,I3,I5
9 I1,I2,I3
C2
L2
ITEMS SUPPORT
COUNT
I1,12 6
I1,I3 7
I1,14 6
I1,15 2
I2,I3 2
I2,I4 2
I2,I5 2
STEP 3
15
ITEMS SUPPORT
COUNT
I1,12,I3 2
I1,I2.I4 1
I1,I2,I5 2
I1,I3,I4 0
I1,I4,I5 0
I2,I3,I5 1
I2,I4,I5 0
I3,I4,I5 0
TID ITEMS
1 I1,I2,I5
2 I2,I4
3 I2,I3
4 I1,I2,I4
5 I1,I3
6 I2,I3
7 I1,I3
8 I1,I2,I3,I5
9 I1,I2,I3
C3
L3
ITEMS SUPPORT
COUNT
I1,12,I3 2
I1,I2,I5 2
Confidence
A confidence of 60% means that 60% of the customers, who purchased milk and
bread also bought butter.
Confidence(A->B)=Support count(A∪B)/Support count(A)
Itemset {I1, I2, I3} //from L3
SO rules can be
[I1 ∪ I2] →[I3] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I1 ∪ I2) = 2/4*100=50%
[I1 ∪ I3] →[I2] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I1 ∪ I3) = 2/4*100=50%
[I2 ∪ I3] →[I1] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I2 ∪ I3) = 2/4*100=50%
[I1] →[I2 ∪ I3] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I1) = 2/6*100=33%
[I2] →[I1 ∪ I3] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I2) = 2/7*100=28%
[I3] →[I1 ∪ I2] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I3) = 2/6*100=33%
So if minimum confidence is 50%, then first 3 rules can be considered as strong
association rules.
16
ITEMS SUPPORT
COUNT
I1,12,I3 2
I1,I2,I5 2
Thanks!
ANY QUESTIONS?
You can find me at
@ifirozy
ifirozy@gmail.com
17

More Related Content

Similar to Association Rule Mining || Data Mining

6. Association Rule.pdf
6. Association Rule.pdf6. Association Rule.pdf
6. Association Rule.pdfJyoti Yadav
 
ASSOCIATION Rule plus MArket basket Analysis.pptx
ASSOCIATION Rule plus MArket basket Analysis.pptxASSOCIATION Rule plus MArket basket Analysis.pptx
ASSOCIATION Rule plus MArket basket Analysis.pptxSherishJaved
 
Lect6 Association rule & Apriori algorithm
Lect6 Association rule & Apriori algorithmLect6 Association rule & Apriori algorithm
Lect6 Association rule & Apriori algorithmhktripathy
 
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
 
1.11.association mining 3
1.11.association mining 31.11.association mining 3
1.11.association mining 3Krish_ver2
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligenceGeo Marian
 
3 association rule mining
3 association rule mining3 association rule mining
3 association rule miningVishal Dutt
 
5Association AnalysisBasic Concepts an.docx
 5Association AnalysisBasic Concepts an.docx 5Association AnalysisBasic Concepts an.docx
5Association AnalysisBasic Concepts an.docxShiraPrater50
 
An Enhanced Approach of Sensitive Information Hiding
An Enhanced Approach of Sensitive Information HidingAn Enhanced Approach of Sensitive Information Hiding
An Enhanced Approach of Sensitive Information Hidingijsrd.com
 
Rules of data mining
Rules of data miningRules of data mining
Rules of data miningSulman Ahmed
 
Data Mining Concepts 15061
Data Mining Concepts 15061Data Mining Concepts 15061
Data Mining Concepts 15061badirh
 
Data Mining Concepts
Data Mining ConceptsData Mining Concepts
Data Mining Conceptsdataminers.ir
 
Data Mining Concepts
Data Mining ConceptsData Mining Concepts
Data Mining ConceptsDung Nguyen
 
Market Basket Analysis
Market Basket AnalysisMarket Basket Analysis
Market Basket AnalysisSandeep Prasad
 
AssociationRule.pdf
AssociationRule.pdfAssociationRule.pdf
AssociationRule.pdfWailaBaba
 
Association rule mining and Apriori algorithm
Association rule mining and Apriori algorithmAssociation rule mining and Apriori algorithm
Association rule mining and Apriori algorithmhina firdaus
 
Data Mining Apriori Algorithm Implementation using R
Data Mining Apriori Algorithm Implementation using RData Mining Apriori Algorithm Implementation using R
Data Mining Apriori Algorithm Implementation using RIRJET Journal
 

Similar to Association Rule Mining || Data Mining (20)

6. Association Rule.pdf
6. Association Rule.pdf6. Association Rule.pdf
6. Association Rule.pdf
 
ASSOCIATION Rule plus MArket basket Analysis.pptx
ASSOCIATION Rule plus MArket basket Analysis.pptxASSOCIATION Rule plus MArket basket Analysis.pptx
ASSOCIATION Rule plus MArket basket Analysis.pptx
 
Lect6 Association rule & Apriori algorithm
Lect6 Association rule & Apriori algorithmLect6 Association rule & Apriori algorithm
Lect6 Association rule & Apriori algorithm
 
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
 
1.11.association mining 3
1.11.association mining 31.11.association mining 3
1.11.association mining 3
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligence
 
3 association rule mining
3 association rule mining3 association rule mining
3 association rule mining
 
5Association AnalysisBasic Concepts an.docx
 5Association AnalysisBasic Concepts an.docx 5Association AnalysisBasic Concepts an.docx
5Association AnalysisBasic Concepts an.docx
 
An Enhanced Approach of Sensitive Information Hiding
An Enhanced Approach of Sensitive Information HidingAn Enhanced Approach of Sensitive Information Hiding
An Enhanced Approach of Sensitive Information Hiding
 
Association rules
Association rulesAssociation rules
Association rules
 
Rules of data mining
Rules of data miningRules of data mining
Rules of data mining
 
Data mining arm-2009-v0
Data mining arm-2009-v0Data mining arm-2009-v0
Data mining arm-2009-v0
 
Data Mining Concepts 15061
Data Mining Concepts 15061Data Mining Concepts 15061
Data Mining Concepts 15061
 
Data Mining Concepts
Data Mining ConceptsData Mining Concepts
Data Mining Concepts
 
Data Mining Concepts
Data Mining ConceptsData Mining Concepts
Data Mining Concepts
 
Market Basket Analysis
Market Basket AnalysisMarket Basket Analysis
Market Basket Analysis
 
Association rules and frequent pattern growth algorithms
Association rules and frequent pattern growth algorithmsAssociation rules and frequent pattern growth algorithms
Association rules and frequent pattern growth algorithms
 
AssociationRule.pdf
AssociationRule.pdfAssociationRule.pdf
AssociationRule.pdf
 
Association rule mining and Apriori algorithm
Association rule mining and Apriori algorithmAssociation rule mining and Apriori algorithm
Association rule mining and Apriori algorithm
 
Data Mining Apriori Algorithm Implementation using R
Data Mining Apriori Algorithm Implementation using RData Mining Apriori Algorithm Implementation using R
Data Mining Apriori Algorithm Implementation using R
 

More from Iffat Firozy

Data Preprocessing || Data Mining
Data Preprocessing || Data MiningData Preprocessing || Data Mining
Data Preprocessing || Data MiningIffat Firozy
 
K-means Clustering || Data Mining
K-means Clustering || Data MiningK-means Clustering || Data Mining
K-means Clustering || Data MiningIffat Firozy
 
Decision Tree || Data Mining ..
Decision Tree || Data Mining ..Decision Tree || Data Mining ..
Decision Tree || Data Mining ..Iffat Firozy
 
Data mining || Decision tree..
Data mining || Decision tree..Data mining || Decision tree..
Data mining || Decision tree..Iffat Firozy
 
Data Mining || Decision Tree
Data Mining || Decision TreeData Mining || Decision Tree
Data Mining || Decision TreeIffat Firozy
 
Hidden Markov Model
Hidden Markov ModelHidden Markov Model
Hidden Markov ModelIffat Firozy
 
Internet of things (Iot)
Internet of things (Iot)Internet of things (Iot)
Internet of things (Iot)Iffat Firozy
 
Hospital Introducer & Direction Giving Robot.
Hospital Introducer & Direction Giving Robot.Hospital Introducer & Direction Giving Robot.
Hospital Introducer & Direction Giving Robot.Iffat Firozy
 
How to calculate SGPA & CGPA
How to calculate SGPA & CGPAHow to calculate SGPA & CGPA
How to calculate SGPA & CGPAIffat Firozy
 

More from Iffat Firozy (9)

Data Preprocessing || Data Mining
Data Preprocessing || Data MiningData Preprocessing || Data Mining
Data Preprocessing || Data Mining
 
K-means Clustering || Data Mining
K-means Clustering || Data MiningK-means Clustering || Data Mining
K-means Clustering || Data Mining
 
Decision Tree || Data Mining ..
Decision Tree || Data Mining ..Decision Tree || Data Mining ..
Decision Tree || Data Mining ..
 
Data mining || Decision tree..
Data mining || Decision tree..Data mining || Decision tree..
Data mining || Decision tree..
 
Data Mining || Decision Tree
Data Mining || Decision TreeData Mining || Decision Tree
Data Mining || Decision Tree
 
Hidden Markov Model
Hidden Markov ModelHidden Markov Model
Hidden Markov Model
 
Internet of things (Iot)
Internet of things (Iot)Internet of things (Iot)
Internet of things (Iot)
 
Hospital Introducer & Direction Giving Robot.
Hospital Introducer & Direction Giving Robot.Hospital Introducer & Direction Giving Robot.
Hospital Introducer & Direction Giving Robot.
 
How to calculate SGPA & CGPA
How to calculate SGPA & CGPAHow to calculate SGPA & CGPA
How to calculate SGPA & CGPA
 

Recently uploaded

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
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
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
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
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 

Recently uploaded (20)

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
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 ...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
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
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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🔝
 
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🔝
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 

Association Rule Mining || Data Mining

  • 2. Hello! I AM IFFAT FIROZY I am here because I love to teach. You can find me at ifirozy@gmail.com 2
  • 4. “ Association rules are if-then statements that help to show the probability of relationships between data items within large data sets in various types of databases. Association rule mining has a number of applications and is widely used to help discover sales correlations in transactional data or in medical data sets. 4
  • 5. BASIC CONCEPT 5 TID ITEMS 1 Bread, Milk 2 Bread, Diaper, Beer, Eggs 3 Milk, Diaper, Beer, Coke 4 Bread, Milk, Diaper, Beer 5 Bread, Milk, Diaper, Coke
  • 6. Basic Concepts Support count(𝜎): frequency of occurrence of a itemset. Here σ({Milk, Bread, Diaper})=2 Frequent itemset: An itemset whose support is greater than or equal to minusp threshold. Association rule: X →Y, where X and Y are nonoverlapping itemset. Example: {Milk, Diaper}->{Beer} 6
  • 7. Basic Concepts Support(s): The number of transactions that include items in the {X} and {Y} parts of the rule as a percentage of the total number of transaction. It is a measure of how frequently the collection of items occur together as a percentage of all transactions. It is interpreted as fraction of transactions that contain both X and Y. From the above table, {Milk, Diaper} →{Beer} S= 𝛔(X+Y) / total = 𝝈 ({Milk, Diaper, Beer}) / |T| = 2/5 = 0.4 7 TID ITEMS 1 Bread, Milk 2 Bread, Diaper, Beer, Eggs 3 Milk, Diaper, Beer, Coke 4 Bread, Milk, Diaper, Beer 5 Bread, Milk, Diaper, Coke
  • 8. Confidence(c): It is the ratio of the no of transactions that includes all items in {B} as well as the no of transactions that includes all items in {A} to the no of transactions that includes all items in {A}. It measures how often each item in Y appears in transactions that contains items in X also. From the above table, {Milk, Diaper} →{Beer} confidence(X →Y) = support(X ∪ Y) / support(X) c= σ (Milk, Diaper, Beer)/σ (Milk, Diaper) = 2/3 = 0.67 Basic concept 8 TID ITEMS 1 Bread, Milk 2 Bread, Diaper, Beer, Eggs 3 Milk, Diaper, Beer, Coke 4 Bread, Milk, Diaper, Beer 5 Bread, Milk, Diaper, Coke
  • 9. Lift(l): The lift of the rule X=>Y is the confidence of the rule divided by the expected confidence, assuming that the itemsets X and Y are independent of each other. The expected confidence is the confidence divided by the frequency of {Y} Lift value near 1 indicates X and Y almost often appear together as expected, greater than 1 means they appear together more than expected and less than 1 means they appear less than expected. Greater lift values indicate stronger association. lift(X →Y) = confidence (X →Y) / support(Y) l= σ({Milk, Diaper, Beer})/ σ({Milk, Diaper})* σ({Beer}) = 0.4/(0.6*0.6) = 1.11 Basic concept 9 TID ITEMS 1 Bread, Milk 2 Bread, Diaper, Beer, Eggs 3 Milk, Diaper, Beer, Coke 4 Bread, Milk, Diaper, Beer 5 Bread, Milk, Diaper, Coke
  • 10. PROBLEM How many itemsets are there? -Given n items, there are 2n possible itemsets 10
  • 12. Apriori Algorithm All non-empty subset of frequent itemset must be frequent. The key concept of Apriori algorithm is its anti-monotonicity of support measure. Apriori assumes that ‘’All subsets of a frequent itemset must be frequent(Apriori property). If an itemset is infrequent, all its supersets will be infrequent.’’ 12 TID ITEMS 1 I1,I2,I5 2 I2,I4 3 I2,I3 4 I1,I2,I4 5 I1,I3 6 I2,I3 7 I1,I3 8 I1,I2,I3,I5 9 I1,I2,I3 -minimum support count is 2 -minimum confidence is 50%
  • 13. STEP 1 13 1) Create a table containing support count of each item present in dataset – Called C1(candidate set) ITEMS SUPPORT COUNT I1 6 I2 7 I3 6 I4 2 I5 2 TID ITEMS 1 I1,I2,I5 2 I2,I4 3 I2,I3 4 I1,I2,I4 5 I1,I3 6 I2,I3 7 I1,I3 8 I1,I2,I3,I5 9 I1,I2,I3 ITEMS SUPPORT COUNT I1 6 I2 7 I3 6 I4 2 I5 2 C1L1 2) compare candidate set item’s support count with minimum support count(here min_support=2 if support count of candidate set items is less than min_support then remove those items). This gives us itemset L1.
  • 14. STEP 2 14 ITEMS SUPPORT COUNT I1,12 6 I1,I3 7 I1,14 6 I1,15 2 I2,I3 2 I2,I4 2 I2,I5 2 I3,I4 0 I3,I5 1 I4,I5 0 TID ITEMS 1 I1,I2,I5 2 I2,I4 3 I2,I3 4 I1,I2,I4 5 I1,I3 6 I2,I3 7 I1,I3 8 I1,I2,I3,I5 9 I1,I2,I3 C2 L2 ITEMS SUPPORT COUNT I1,12 6 I1,I3 7 I1,14 6 I1,15 2 I2,I3 2 I2,I4 2 I2,I5 2
  • 15. STEP 3 15 ITEMS SUPPORT COUNT I1,12,I3 2 I1,I2.I4 1 I1,I2,I5 2 I1,I3,I4 0 I1,I4,I5 0 I2,I3,I5 1 I2,I4,I5 0 I3,I4,I5 0 TID ITEMS 1 I1,I2,I5 2 I2,I4 3 I2,I3 4 I1,I2,I4 5 I1,I3 6 I2,I3 7 I1,I3 8 I1,I2,I3,I5 9 I1,I2,I3 C3 L3 ITEMS SUPPORT COUNT I1,12,I3 2 I1,I2,I5 2
  • 16. Confidence A confidence of 60% means that 60% of the customers, who purchased milk and bread also bought butter. Confidence(A->B)=Support count(A∪B)/Support count(A) Itemset {I1, I2, I3} //from L3 SO rules can be [I1 ∪ I2] →[I3] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I1 ∪ I2) = 2/4*100=50% [I1 ∪ I3] →[I2] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I1 ∪ I3) = 2/4*100=50% [I2 ∪ I3] →[I1] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I2 ∪ I3) = 2/4*100=50% [I1] →[I2 ∪ I3] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I1) = 2/6*100=33% [I2] →[I1 ∪ I3] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I2) = 2/7*100=28% [I3] →[I1 ∪ I2] //confidence = sup(I1 ∪ I2 ∪ I3)/sup(I3) = 2/6*100=33% So if minimum confidence is 50%, then first 3 rules can be considered as strong association rules. 16 ITEMS SUPPORT COUNT I1,12,I3 2 I1,I2,I5 2
  • 17. Thanks! ANY QUESTIONS? You can find me at @ifirozy ifirozy@gmail.com 17