SlideShare a Scribd company logo
1 of 18
A P P L I C A T I O N O F A S S O C I A T I O N M I N I N G I N A N A L Y Z I N G T H E C O N S U M E R
B E H A V I O R B Y M A R K E T B A S K E T T R A N S A C T I O N
13.11.14Association Analysis of Market Basket Transaction
Association Analysis of Market
Basket Transaction
Prepared by-
Sowmiyan Morri
Swapnil Soni
DoMS, IISc
Course-
Data Mining
Instructors-
Prof Parthasarathy
2
Index
13.11.14Association Analysis of Market Basket Transaction
• Visualization of dataset
• Pre-processing of dataset
• Association analysis -3 tasks
 Results
 Insights
• Classification Vs Association
• Conclusion & Recommendation
 For Business
 For Business Analyst
3
Visualization of dataset
13.11.14Association Analysis of Market Basket Transaction
Transaction ID
Items
Item-1 Item-2 Item-3 -- Item-70
Acorn Squash Apple Brats Bacon -- Yukon Gold Potatoes Total
1 T F F -- -- 1
2 F F F -- -- 1
3 F F T -- -- 2
4 F F F -- -- 1
5 F F F -- -- 1
6 F T F -- -- 1
7 F F F -- -- 1
8 F F F -- -- 2
9 F F F -- -- 1
10 F F F -- -- 1
11 F F F -- -- 3
12 F F F -- -- 2
13 F F F -- -- 2
14 F F F -- -- 3
15 F F F -- -- 1
-- -- -- -- -- -- 2
1731 -- -- -- -- -- 1
Total 76 38 39 -- 71 3815
Support 4.39% 2.20% 2.25% -- 4.10%
Total no. of Attributes/Items 70
Total no. of Transactions 1731
4
Visualization of dataset
13.11.14Association Analysis of Market Basket Transaction
0
20
40
60
80
100
120
140
160
180
Frequency of Attributes
(Support count of 1-itemset)
Statistics
Range [0,1731]
Average 54.5
Std Deviation 51.4
Min 1
Max 167
Attention:
Maximum support an itemset can have= 167/1731 = 9.6%
0
2
4
6
8
10
12
14
16
T_ID-196
T_ID-633
T_ID-1648
T_ID-1638
T_ID-993
T_ID-203
T_ID-728
T_ID-1145
T_ID-1714
T_ID-254
T_ID-600
T_ID-821
T_ID-1189
T_ID-1431
T_ID-22
T_ID-182
T_ID-332
T_ID-498
T_ID-629
T_ID-794
T_ID-971
T_ID-1123
T_ID-1308
T_ID-1453
T_ID-1603
T_ID-28
T_ID-110
T_ID-180
T_ID-253
T_ID-321
T_ID-393
T_ID-471
T_ID-534
T_ID-591
T_ID-671
T_ID-751
T_ID-820
T_ID-898
T_ID-964
T_ID-1042
T_ID-1107
T_ID-1169
T_ID-1241
T_ID-1300
T_ID-1370
T_ID-1440
T_ID-1502
T_ID-1569
T_ID-1653
T_ID-1697
No. of Items in Transaction
Quite Spars dataset
Pre-processing required!
Statistics
Range [0,70]
Average 2.20
Std Deviation 1.8
Min 1
Max 15
Real motivation-
‘Weka’ failed to handle the dataset!
5
Pre-processing of dataset
13.11.14Association Analysis of Market Basket Transaction
Transaction ID
Items
Item-1 Item-2 Item-3 -- Item-70
Acorn Squash Apple Brats Bacon -- Yukon Gold Potatoes Total
1 T F F -- -- 1
2 F F F -- -- 1
3 F F T -- -- 2
4 F F F -- -- 1
5 F F F -- -- 1
6 F T F -- -- 1
7 F F F -- -- 1
8 F F F -- -- 2
9 F F F -- -- 1
10 F F F -- -- 1
11 F F F -- -- 3
12 F F F -- -- 2
13 F F F -- -- 2
14 F F F -- -- 3
15 F F F -- -- 1
-- -- -- -- -- -- 2
1731 -- -- -- -- -- 1
Total 76 38 39 -- 71 3815
Support 4.39% 2.20% 2.25% -- 4.10%
Total no. of Attributes/Items 70
Total no. of Transactions 1731
Total no. of Attributes/Items with support <2% 34
Total no. of Items after pruning 36
Pruning of attributes below the desired level of support
Logic: Apriori algorithm- If the individual item sets are not frequent than its superset
will also be not frequent
Gain: Calculation & memory reduced by pruning
13.11.14Association Analysis of Market Basket Transaction
Fix the confidence level at 60%. Set the minimum support at 2%, 5%,
10%, 20%, and 50%, run the Apriori algorithm to discover association
rules and summarize your findings.
Task-1
7
Task-1 : Result
13.11.14Association Analysis of Market Basket Transaction
Confidence 60%
Minimum Support 2% 5% 10% 20% 50%
Rules generated 297 22 NA NA NA
Generated sets of large itemsets:
Size of set of large itemsets L(1) 36 18 NA NA NA
Size of set of large itemsets L(2) 37 10 NA NA NA
Size of set of large itemsets L(3) 36 2 NA NA NA
Size of set of large itemsets L(4) 21 NA NA NA NA
Size of set of large itemsets L(5) 5 NA NA NA NA
Total Itemsets 135 30 0 0 0297
22
135
30
2% 5%
Rulesgenerated
Minimum Support
Min Support Vs Rules @ 60% Confidence
Rules generated
Itemsets
Inferences
1. Frequent itemsets can be found only up to 5% of Min Support
2. Number of frequent itemsets reduces with increase in Min Support
3. At the fixed given confidence level no. of Association Rules decreases with decrease in frequent
itemset
8
Task-1: Insights
Top-10 Rules
Antecedent Consequence
1. Butter Earthworm Segments > Black eye peas
2. Black eye peas Blue cheese > Butter
3. Black eye peas Butter > Earthworm Segments
4. Black eye peas > Earthworm Segments
5. Butter > Blue cheese
6. Black eye peas Butter > Blue cheese
7. Chilly Red Flame > Earthworm Segments
8. Blue cheese > Butter
9. Black eye peas Earthworm Segments > Butter
10. Basilisk Tail > Strawberry Essence
13.11.14Association Analysis of Market Basket Transaction
13.11.14Association Analysis of Market Basket Transaction
Fix the minimum support at 2%. Set the confidence level at 90%, 80%,
70%, 60%, and 50%, run the Apriori algorithm to discover association
rules and summarize your findings.
Task-2
10
Task-2 : Result
13.11.14Association Analysis of Market Basket Transaction
Minimum Support 2%
Confidence 90% 80% 70% 60% 50%
Rules generated 134 140 245 297 417
Generated sets of large itemsets:
Size of set of large itemsets L(1) 36 36 36 36 36
Size of set of large itemsets L(2) 37 37 37 37 37
Size of set of large itemsets L(3) 36 36 36 36 36
Size of set of large itemsets L(4) 21 21 21 21 21
Size of set of large itemsets L(5) 5 5 5 5 5
Total 135 135 135 135 135
40% 30% 20% 10% 5%
478 596 734 734 734
36 36 36 36 36
37 37 37 37 37
36 36 36 36 36
21 21 21 21 21
5 5 5 5 5
135 135 135 135 135
134 140
245
297
417
478
596
734 734 734
135 135 135 135 135 135 135 135 135 135
90% 80% 70% 60% 50% 40% 30% 20% 10% 5%
Rulesgenerated
Confidence
Confidence Vs Rules @ 2% Min Support
Rules generated
Itemsets
Inference
1. At the fixed given Min Support no. of Frequent itemsets remains constant irrespective of Confidence
2. No. of Rules increases with decrease in Confidence level
3. Maximum no. of Rules that can be extracted at the given Min Support is 734
11 13.11.14Association Analysis of Market Basket Transaction
Task-2 : Insights
Antecedent Consequence
1. Butter Earthworm Segments > Black eye peas
2. Black eye peas Blue cheese > Butter
3. Chilly Red Flame Black eye peas > Earthworm Segments
4. Garden soil Strawberry Essence > Salamander Skin
5. Basilisk Tail Salamander Skin > Strawberry Essence
6. Blue cheese Earthworm Segments > Black eye peas
7. Blue cheese Earthworm Segments > Butter
8. Butter Blue cheese Earthworm Segments > Black eye peas
9. Black eye peas Blue cheese Earthworm Segments > Butter
10. Blue cheese Earthworm Segments > Black eye peas Butter
13.11.14Association Analysis of Market Basket Transaction
Identify the diary products (milk, cheese etc.) from the items lists and
group them into one binary variable. If a transaction has diary products
replace them (only the diary products) with the binary variable. Use it as
the class label and build a decision tree using ID3 to predict the purchase
of diary products. Compare the rules generated from the decision tree
with those generated earlier. Draw conclusions on the impact of
minimum support and confidence levels.
Task-3
Supervised Learning
Pre-determined Class Attribute: Dairy Product
13
Task-3 : Pre-processing
13.11.14Association Analysis of Market Basket Transaction
Bluecheese Butter ButterCheese EwezerellaCheese FetaCheese JuustoleipaCheese saltedsweetcreambutter VanillaIceCream
Dairy Products (8 No.s)
Total no. of Independent
Attributes
62
Total no. of Transactions 1731
Class Attribute Dairy
Product
Transaction
ID
Attributes Class
AttributesItem-1 Item-2 Item-3 -- Item-62
Acorn Squash Apple Brats Bacon --
Yukon Gold
Potatoes Dairy Product
1 T F F -- -- F
2 F F F -- -- F
3 F F T -- -- F
4 F F F -- -- F
5 F F F -- -- F
6 F T F -- -- F
7 F F F -- -- F
8 F F F -- -- F
9 F F F -- -- F
10 F F F -- -- F
11 F F F -- -- F
12 F F F -- -- F
13 F F F -- -- F
14 F F F -- -- F
15 F F F -- -- F
-- -- -- -- -- -- F
1731 -- -- -- -- -- --
Supervised classification:
ID3 Algorithm applied!
14
Task-3 : Result
13.11.14Association Analysis of Market Basket Transaction
J48 Decision Tree1 | | | | | | | | | | | | | | | | | | | | | | | | Salamander Skin = T>Dairy
2 | | | | | | | | | | Bacon = T>Dairy
3 | | | | | | | Chilly Red Flame = T>Dairy
4 | | | | | | Roast potato = T>Dairy
5 | | | | | | | Strawberry Essence = T>Dairy
6 | | | | | | Bacon = T>Dairy
7 | | | | Ground Chicken = T>Dairy
8 | | | Red Potatoes = T>Dairy
9 | Salad Mix = T>Dairy
1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Salad Mix =
T>Dairy
2 Black eye peas = T>Dairy
Rules : J48
Rules : ID3
Observation:
Above highlighted Rules are common in both-
Association & Classification
15
Conclusion & Recommendation
 Supervised learning- Classification
 Large number of ‘Binary’ attributes explodes the huge uninterpretable decision tree.
 High conditional decisions: If item-1 is not, item-2 is not…& so on then Dairy product=Yes
 Symmetric treatment: ‘Presence’ & ‘Absence’ of an item in a transaction are treated with equal
importance.
13.11.14Association Analysis of Market Basket Transaction
 Unsupervised learning- Association
 Large number of ‘Binary’ attributes are handled prudently using ‘Min Support’ criteria; Only
qualified attributes/itemsets are considered for analysis
 Asymmetric treatment: Only ‘Presence’ of an item in a transaction is of interest.
 Simple and interpretable Rules required for market basket transaction to design the market
strategies – ‘Cross selling’.
Comparison between Supervised & Un-supervised learning
Association mining is observed to be better technique for Market Basket Analysis!
For Business Analyst
16
Conclusion & Recommendation
13.11.14Association Analysis of Market Basket Transaction
Good opportunity to maximize revenue by deploying ‘Association Mining!
For Business
• Trivial Associations
 Relation among Dairy products- ‘Butter’, ‘Black Eye Peas’, ‘Blue Cheese’- seems to be
obvious as they act as supplements of Vitamin ‘D’.
 Relation between ‘Salmander Skin’ & ‘Strawberry Essence’ is observed as they are used
for Salmandar Brandy through Fermentation process.
• Non-trivial Associations
 Relation between ‘Garden Soil’ & ‘Strawberry Essence’
 Relation between ‘Earthworm’ & ‘Black Eye Peas’
Cross selling
Source: http://www.grailtrail.ndo.co.uk/grails/brandy.html
http://greatist.com/health/18-surprising-dairy-free-sources-calcium
17
References & Tools
13.11.14Association Analysis of Market Basket Transaction
• Wikipedia
• Greatist.com
• MS -Excel
• Data Mining tool- Weka
13.11.14Association Analysis of Market Basket Transaction
Thankyou!
Inference:
Data Mining enables businesses!

More Related Content

Viewers also liked

Real-time Market Basket Analysis for Retail with Hadoop
Real-time Market Basket Analysis for Retail with HadoopReal-time Market Basket Analysis for Retail with Hadoop
Real-time Market Basket Analysis for Retail with Hadoop
DataWorks Summit
 
Data mining slides
Data mining slidesData mining slides
Data mining slides
smj
 
Review of a paper on market basket analysis
Review of a paper on market basket analysisReview of a paper on market basket analysis
Review of a paper on market basket analysis
Dev Karan Singh Maletia
 
Product recommendation for Santander Bank customers
Product recommendation for Santander Bank customersProduct recommendation for Santander Bank customers
Product recommendation for Santander Bank customers
Sumit Saini
 
PhD Thesis: Mining abstractions in scientific workflows
PhD Thesis: Mining abstractions in scientific workflowsPhD Thesis: Mining abstractions in scientific workflows
PhD Thesis: Mining abstractions in scientific workflows
dgarijo
 

Viewers also liked (20)

Market Basket Analysis
Market Basket AnalysisMarket Basket Analysis
Market Basket Analysis
 
Real-time Market Basket Analysis for Retail with Hadoop
Real-time Market Basket Analysis for Retail with HadoopReal-time Market Basket Analysis for Retail with Hadoop
Real-time Market Basket Analysis for Retail with Hadoop
 
Market basket analysis
Market basket analysisMarket basket analysis
Market basket analysis
 
Market basket analysis
Market basket analysisMarket basket analysis
Market basket analysis
 
Market Basket Analysis in SAS
Market Basket Analysis in SASMarket Basket Analysis in SAS
Market Basket Analysis in SAS
 
Masket Basket Analysis
Masket Basket AnalysisMasket Basket Analysis
Masket Basket Analysis
 
Market baasket analysis
Market baasket analysisMarket baasket analysis
Market baasket analysis
 
Data Mining: Association Rules Basics
Data Mining: Association Rules BasicsData Mining: Association Rules Basics
Data Mining: Association Rules Basics
 
Transactions / Basket Analysis
Transactions / Basket AnalysisTransactions / Basket Analysis
Transactions / Basket Analysis
 
Market basketanalysis using r
Market basketanalysis using rMarket basketanalysis using r
Market basketanalysis using r
 
Association Rule Mining in Data Mining
Association Rule Mining in Data Mining Association Rule Mining in Data Mining
Association Rule Mining in Data Mining
 
Data mining slides
Data mining slidesData mining slides
Data mining slides
 
Review of a paper on market basket analysis
Review of a paper on market basket analysisReview of a paper on market basket analysis
Review of a paper on market basket analysis
 
Santander
SantanderSantander
Santander
 
Market Basket Analysis in SAS
Market Basket Analysis in SASMarket Basket Analysis in SAS
Market Basket Analysis in SAS
 
Product recommendation for Santander Bank customers
Product recommendation for Santander Bank customersProduct recommendation for Santander Bank customers
Product recommendation for Santander Bank customers
 
Affinity Insight for Retail
Affinity Insight for RetailAffinity Insight for Retail
Affinity Insight for Retail
 
Increasing Order Size With Basket Analysis
Increasing Order Size With Basket AnalysisIncreasing Order Size With Basket Analysis
Increasing Order Size With Basket Analysis
 
Mining Fuzzy Moving Object Clusters
Mining Fuzzy Moving Object ClustersMining Fuzzy Moving Object Clusters
Mining Fuzzy Moving Object Clusters
 
PhD Thesis: Mining abstractions in scientific workflows
PhD Thesis: Mining abstractions in scientific workflowsPhD Thesis: Mining abstractions in scientific workflows
PhD Thesis: Mining abstractions in scientific workflows
 

Similar to Data mining- Association Analysis -market basket

Configurationguidecin 121107011256-phpapp02
Configurationguidecin 121107011256-phpapp02Configurationguidecin 121107011256-phpapp02
Configurationguidecin 121107011256-phpapp02
Aditya Pandey
 
Association Mining
Association Mining Association Mining
Association Mining
Edureka!
 
FRB Sales Page 1 of 30-1MM 1-3MM 3-5MM 5-10MM 10-25MM 25MM.docx
FRB Sales Page 1 of 30-1MM 1-3MM 3-5MM 5-10MM 10-25MM 25MM.docxFRB Sales Page 1 of 30-1MM 1-3MM 3-5MM 5-10MM 10-25MM 25MM.docx
FRB Sales Page 1 of 30-1MM 1-3MM 3-5MM 5-10MM 10-25MM 25MM.docx
hanneloremccaffery
 

Similar to Data mining- Association Analysis -market basket (20)

Case study on Transaction in Grocery Store
Case study on Transaction in Grocery Store Case study on Transaction in Grocery Store
Case study on Transaction in Grocery Store
 
Profitable Itemset Mining using Weights
Profitable Itemset Mining using WeightsProfitable Itemset Mining using Weights
Profitable Itemset Mining using Weights
 
A Method of Mining Association Rules for Geographical Points of Interest
A Method of Mining Association Rules for Geographical Points of InterestA Method of Mining Association Rules for Geographical Points of Interest
A Method of Mining Association Rules for Geographical Points of Interest
 
DMML4_apriori (1).ppt
DMML4_apriori (1).pptDMML4_apriori (1).ppt
DMML4_apriori (1).ppt
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
ASSOCIATION RULE MINING BASED ON TRADE LIST
ASSOCIATION RULE MINING BASED  ON TRADE LISTASSOCIATION RULE MINING BASED  ON TRADE LIST
ASSOCIATION RULE MINING BASED ON TRADE LIST
 
SAP CIN
SAP CINSAP CIN
SAP CIN
 
Dwh lecture slides-week 13
Dwh lecture slides-week 13Dwh lecture slides-week 13
Dwh lecture slides-week 13
 
APRIORI ALGORITHM -PPT.pptx
APRIORI ALGORITHM -PPT.pptxAPRIORI ALGORITHM -PPT.pptx
APRIORI ALGORITHM -PPT.pptx
 
Configurationguidecin 121107011256-phpapp02
Configurationguidecin 121107011256-phpapp02Configurationguidecin 121107011256-phpapp02
Configurationguidecin 121107011256-phpapp02
 
IRJET-Comparative Analysis of Apriori and Apriori with Hashing Algorithm
IRJET-Comparative Analysis of  Apriori and Apriori with Hashing AlgorithmIRJET-Comparative Analysis of  Apriori and Apriori with Hashing Algorithm
IRJET-Comparative Analysis of Apriori and Apriori with Hashing Algorithm
 
Dwh lecture slides-week10
Dwh lecture slides-week10Dwh lecture slides-week10
Dwh lecture slides-week10
 
DM -Unit 2-PPT.ppt
DM -Unit 2-PPT.pptDM -Unit 2-PPT.ppt
DM -Unit 2-PPT.ppt
 
Association Rule Mining
Association Rule MiningAssociation Rule Mining
Association Rule Mining
 
Inventory Management Part II
Inventory Management Part IIInventory Management Part II
Inventory Management Part II
 
Hiding slides
Hiding slidesHiding slides
Hiding slides
 
Association Mining
Association Mining Association Mining
Association Mining
 
Project report acc 304
Project report  acc 304Project report  acc 304
Project report acc 304
 
Lec6_Association.ppt
Lec6_Association.pptLec6_Association.ppt
Lec6_Association.ppt
 
FRB Sales Page 1 of 30-1MM 1-3MM 3-5MM 5-10MM 10-25MM 25MM.docx
FRB Sales Page 1 of 30-1MM 1-3MM 3-5MM 5-10MM 10-25MM 25MM.docxFRB Sales Page 1 of 30-1MM 1-3MM 3-5MM 5-10MM 10-25MM 25MM.docx
FRB Sales Page 1 of 30-1MM 1-3MM 3-5MM 5-10MM 10-25MM 25MM.docx
 

More from Swapnil Soni (9)

Dynamic decision model for cyclical employee Scheduling
Dynamic decision model for cyclical employee SchedulingDynamic decision model for cyclical employee Scheduling
Dynamic decision model for cyclical employee Scheduling
 
State of economy - economic survey of India 2013-14
State of economy - economic survey of India 2013-14State of economy - economic survey of India 2013-14
State of economy - economic survey of India 2013-14
 
Nurse schedule goal programming (Cyclical)
Nurse schedule goal programming (Cyclical)Nurse schedule goal programming (Cyclical)
Nurse schedule goal programming (Cyclical)
 
Virgin mobiles pricing for the very first time
Virgin mobiles  pricing for the very first timeVirgin mobiles  pricing for the very first time
Virgin mobiles pricing for the very first time
 
Marketing SBI SMS unhappy
Marketing  SBI SMS unhappyMarketing  SBI SMS unhappy
Marketing SBI SMS unhappy
 
Trade policy (Indian Context)
Trade policy (Indian Context)Trade policy (Indian Context)
Trade policy (Indian Context)
 
Merchandising & Marketing
Merchandising & Marketing  Merchandising & Marketing
Merchandising & Marketing
 
Public spending
Public spendingPublic spending
Public spending
 
Technological innovations for sustainability
Technological innovations for sustainabilityTechnological innovations for sustainability
Technological innovations for sustainability
 

Recently uploaded

➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...
➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
amitlee9823
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
gajnagarg
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
gajnagarg
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
amitlee9823
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
karishmasinghjnh
 
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
gajnagarg
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
amitlee9823
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
only4webmaster01
 

Recently uploaded (20)

➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...
➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
 
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
 
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning Approach
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
 

Data mining- Association Analysis -market basket

  • 1. A P P L I C A T I O N O F A S S O C I A T I O N M I N I N G I N A N A L Y Z I N G T H E C O N S U M E R B E H A V I O R B Y M A R K E T B A S K E T T R A N S A C T I O N 13.11.14Association Analysis of Market Basket Transaction Association Analysis of Market Basket Transaction Prepared by- Sowmiyan Morri Swapnil Soni DoMS, IISc Course- Data Mining Instructors- Prof Parthasarathy
  • 2. 2 Index 13.11.14Association Analysis of Market Basket Transaction • Visualization of dataset • Pre-processing of dataset • Association analysis -3 tasks  Results  Insights • Classification Vs Association • Conclusion & Recommendation  For Business  For Business Analyst
  • 3. 3 Visualization of dataset 13.11.14Association Analysis of Market Basket Transaction Transaction ID Items Item-1 Item-2 Item-3 -- Item-70 Acorn Squash Apple Brats Bacon -- Yukon Gold Potatoes Total 1 T F F -- -- 1 2 F F F -- -- 1 3 F F T -- -- 2 4 F F F -- -- 1 5 F F F -- -- 1 6 F T F -- -- 1 7 F F F -- -- 1 8 F F F -- -- 2 9 F F F -- -- 1 10 F F F -- -- 1 11 F F F -- -- 3 12 F F F -- -- 2 13 F F F -- -- 2 14 F F F -- -- 3 15 F F F -- -- 1 -- -- -- -- -- -- 2 1731 -- -- -- -- -- 1 Total 76 38 39 -- 71 3815 Support 4.39% 2.20% 2.25% -- 4.10% Total no. of Attributes/Items 70 Total no. of Transactions 1731
  • 4. 4 Visualization of dataset 13.11.14Association Analysis of Market Basket Transaction 0 20 40 60 80 100 120 140 160 180 Frequency of Attributes (Support count of 1-itemset) Statistics Range [0,1731] Average 54.5 Std Deviation 51.4 Min 1 Max 167 Attention: Maximum support an itemset can have= 167/1731 = 9.6% 0 2 4 6 8 10 12 14 16 T_ID-196 T_ID-633 T_ID-1648 T_ID-1638 T_ID-993 T_ID-203 T_ID-728 T_ID-1145 T_ID-1714 T_ID-254 T_ID-600 T_ID-821 T_ID-1189 T_ID-1431 T_ID-22 T_ID-182 T_ID-332 T_ID-498 T_ID-629 T_ID-794 T_ID-971 T_ID-1123 T_ID-1308 T_ID-1453 T_ID-1603 T_ID-28 T_ID-110 T_ID-180 T_ID-253 T_ID-321 T_ID-393 T_ID-471 T_ID-534 T_ID-591 T_ID-671 T_ID-751 T_ID-820 T_ID-898 T_ID-964 T_ID-1042 T_ID-1107 T_ID-1169 T_ID-1241 T_ID-1300 T_ID-1370 T_ID-1440 T_ID-1502 T_ID-1569 T_ID-1653 T_ID-1697 No. of Items in Transaction Quite Spars dataset Pre-processing required! Statistics Range [0,70] Average 2.20 Std Deviation 1.8 Min 1 Max 15 Real motivation- ‘Weka’ failed to handle the dataset!
  • 5. 5 Pre-processing of dataset 13.11.14Association Analysis of Market Basket Transaction Transaction ID Items Item-1 Item-2 Item-3 -- Item-70 Acorn Squash Apple Brats Bacon -- Yukon Gold Potatoes Total 1 T F F -- -- 1 2 F F F -- -- 1 3 F F T -- -- 2 4 F F F -- -- 1 5 F F F -- -- 1 6 F T F -- -- 1 7 F F F -- -- 1 8 F F F -- -- 2 9 F F F -- -- 1 10 F F F -- -- 1 11 F F F -- -- 3 12 F F F -- -- 2 13 F F F -- -- 2 14 F F F -- -- 3 15 F F F -- -- 1 -- -- -- -- -- -- 2 1731 -- -- -- -- -- 1 Total 76 38 39 -- 71 3815 Support 4.39% 2.20% 2.25% -- 4.10% Total no. of Attributes/Items 70 Total no. of Transactions 1731 Total no. of Attributes/Items with support <2% 34 Total no. of Items after pruning 36 Pruning of attributes below the desired level of support Logic: Apriori algorithm- If the individual item sets are not frequent than its superset will also be not frequent Gain: Calculation & memory reduced by pruning
  • 6. 13.11.14Association Analysis of Market Basket Transaction Fix the confidence level at 60%. Set the minimum support at 2%, 5%, 10%, 20%, and 50%, run the Apriori algorithm to discover association rules and summarize your findings. Task-1
  • 7. 7 Task-1 : Result 13.11.14Association Analysis of Market Basket Transaction Confidence 60% Minimum Support 2% 5% 10% 20% 50% Rules generated 297 22 NA NA NA Generated sets of large itemsets: Size of set of large itemsets L(1) 36 18 NA NA NA Size of set of large itemsets L(2) 37 10 NA NA NA Size of set of large itemsets L(3) 36 2 NA NA NA Size of set of large itemsets L(4) 21 NA NA NA NA Size of set of large itemsets L(5) 5 NA NA NA NA Total Itemsets 135 30 0 0 0297 22 135 30 2% 5% Rulesgenerated Minimum Support Min Support Vs Rules @ 60% Confidence Rules generated Itemsets Inferences 1. Frequent itemsets can be found only up to 5% of Min Support 2. Number of frequent itemsets reduces with increase in Min Support 3. At the fixed given confidence level no. of Association Rules decreases with decrease in frequent itemset
  • 8. 8 Task-1: Insights Top-10 Rules Antecedent Consequence 1. Butter Earthworm Segments > Black eye peas 2. Black eye peas Blue cheese > Butter 3. Black eye peas Butter > Earthworm Segments 4. Black eye peas > Earthworm Segments 5. Butter > Blue cheese 6. Black eye peas Butter > Blue cheese 7. Chilly Red Flame > Earthworm Segments 8. Blue cheese > Butter 9. Black eye peas Earthworm Segments > Butter 10. Basilisk Tail > Strawberry Essence 13.11.14Association Analysis of Market Basket Transaction
  • 9. 13.11.14Association Analysis of Market Basket Transaction Fix the minimum support at 2%. Set the confidence level at 90%, 80%, 70%, 60%, and 50%, run the Apriori algorithm to discover association rules and summarize your findings. Task-2
  • 10. 10 Task-2 : Result 13.11.14Association Analysis of Market Basket Transaction Minimum Support 2% Confidence 90% 80% 70% 60% 50% Rules generated 134 140 245 297 417 Generated sets of large itemsets: Size of set of large itemsets L(1) 36 36 36 36 36 Size of set of large itemsets L(2) 37 37 37 37 37 Size of set of large itemsets L(3) 36 36 36 36 36 Size of set of large itemsets L(4) 21 21 21 21 21 Size of set of large itemsets L(5) 5 5 5 5 5 Total 135 135 135 135 135 40% 30% 20% 10% 5% 478 596 734 734 734 36 36 36 36 36 37 37 37 37 37 36 36 36 36 36 21 21 21 21 21 5 5 5 5 5 135 135 135 135 135 134 140 245 297 417 478 596 734 734 734 135 135 135 135 135 135 135 135 135 135 90% 80% 70% 60% 50% 40% 30% 20% 10% 5% Rulesgenerated Confidence Confidence Vs Rules @ 2% Min Support Rules generated Itemsets Inference 1. At the fixed given Min Support no. of Frequent itemsets remains constant irrespective of Confidence 2. No. of Rules increases with decrease in Confidence level 3. Maximum no. of Rules that can be extracted at the given Min Support is 734
  • 11. 11 13.11.14Association Analysis of Market Basket Transaction Task-2 : Insights Antecedent Consequence 1. Butter Earthworm Segments > Black eye peas 2. Black eye peas Blue cheese > Butter 3. Chilly Red Flame Black eye peas > Earthworm Segments 4. Garden soil Strawberry Essence > Salamander Skin 5. Basilisk Tail Salamander Skin > Strawberry Essence 6. Blue cheese Earthworm Segments > Black eye peas 7. Blue cheese Earthworm Segments > Butter 8. Butter Blue cheese Earthworm Segments > Black eye peas 9. Black eye peas Blue cheese Earthworm Segments > Butter 10. Blue cheese Earthworm Segments > Black eye peas Butter
  • 12. 13.11.14Association Analysis of Market Basket Transaction Identify the diary products (milk, cheese etc.) from the items lists and group them into one binary variable. If a transaction has diary products replace them (only the diary products) with the binary variable. Use it as the class label and build a decision tree using ID3 to predict the purchase of diary products. Compare the rules generated from the decision tree with those generated earlier. Draw conclusions on the impact of minimum support and confidence levels. Task-3 Supervised Learning Pre-determined Class Attribute: Dairy Product
  • 13. 13 Task-3 : Pre-processing 13.11.14Association Analysis of Market Basket Transaction Bluecheese Butter ButterCheese EwezerellaCheese FetaCheese JuustoleipaCheese saltedsweetcreambutter VanillaIceCream Dairy Products (8 No.s) Total no. of Independent Attributes 62 Total no. of Transactions 1731 Class Attribute Dairy Product Transaction ID Attributes Class AttributesItem-1 Item-2 Item-3 -- Item-62 Acorn Squash Apple Brats Bacon -- Yukon Gold Potatoes Dairy Product 1 T F F -- -- F 2 F F F -- -- F 3 F F T -- -- F 4 F F F -- -- F 5 F F F -- -- F 6 F T F -- -- F 7 F F F -- -- F 8 F F F -- -- F 9 F F F -- -- F 10 F F F -- -- F 11 F F F -- -- F 12 F F F -- -- F 13 F F F -- -- F 14 F F F -- -- F 15 F F F -- -- F -- -- -- -- -- -- F 1731 -- -- -- -- -- -- Supervised classification: ID3 Algorithm applied!
  • 14. 14 Task-3 : Result 13.11.14Association Analysis of Market Basket Transaction J48 Decision Tree1 | | | | | | | | | | | | | | | | | | | | | | | | Salamander Skin = T>Dairy 2 | | | | | | | | | | Bacon = T>Dairy 3 | | | | | | | Chilly Red Flame = T>Dairy 4 | | | | | | Roast potato = T>Dairy 5 | | | | | | | Strawberry Essence = T>Dairy 6 | | | | | | Bacon = T>Dairy 7 | | | | Ground Chicken = T>Dairy 8 | | | Red Potatoes = T>Dairy 9 | Salad Mix = T>Dairy 1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Salad Mix = T>Dairy 2 Black eye peas = T>Dairy Rules : J48 Rules : ID3 Observation: Above highlighted Rules are common in both- Association & Classification
  • 15. 15 Conclusion & Recommendation  Supervised learning- Classification  Large number of ‘Binary’ attributes explodes the huge uninterpretable decision tree.  High conditional decisions: If item-1 is not, item-2 is not…& so on then Dairy product=Yes  Symmetric treatment: ‘Presence’ & ‘Absence’ of an item in a transaction are treated with equal importance. 13.11.14Association Analysis of Market Basket Transaction  Unsupervised learning- Association  Large number of ‘Binary’ attributes are handled prudently using ‘Min Support’ criteria; Only qualified attributes/itemsets are considered for analysis  Asymmetric treatment: Only ‘Presence’ of an item in a transaction is of interest.  Simple and interpretable Rules required for market basket transaction to design the market strategies – ‘Cross selling’. Comparison between Supervised & Un-supervised learning Association mining is observed to be better technique for Market Basket Analysis! For Business Analyst
  • 16. 16 Conclusion & Recommendation 13.11.14Association Analysis of Market Basket Transaction Good opportunity to maximize revenue by deploying ‘Association Mining! For Business • Trivial Associations  Relation among Dairy products- ‘Butter’, ‘Black Eye Peas’, ‘Blue Cheese’- seems to be obvious as they act as supplements of Vitamin ‘D’.  Relation between ‘Salmander Skin’ & ‘Strawberry Essence’ is observed as they are used for Salmandar Brandy through Fermentation process. • Non-trivial Associations  Relation between ‘Garden Soil’ & ‘Strawberry Essence’  Relation between ‘Earthworm’ & ‘Black Eye Peas’ Cross selling Source: http://www.grailtrail.ndo.co.uk/grails/brandy.html http://greatist.com/health/18-surprising-dairy-free-sources-calcium
  • 17. 17 References & Tools 13.11.14Association Analysis of Market Basket Transaction • Wikipedia • Greatist.com • MS -Excel • Data Mining tool- Weka
  • 18. 13.11.14Association Analysis of Market Basket Transaction Thankyou! Inference: Data Mining enables businesses!