Question1
Transactions Items
T1 A,B,D Find the frequent item set
T2 A,C,D min_sup=50%
T3 A,D,E min_conf=60%
T4 B,E,F
T5 B,C,D,E,F
Step1 min_sup=50% i.e Items show up in more than 3 transactions
Items Frequency Support
A 3 0.60
B 3 0.60
C 2 0.40
D 4 0.80
E 3 0.60
F 2 0.40
Items Frequency
A 3
B 3
D 4
E 3
Step2:
Items Frequency Support
A,B 1 0.20
A,D 3 0.60
A,E 1 0.20
B,D 2 0.40
B,E 2 0.40
D,E 2 0.40
Step3:
Items Frequency Support
A,B,D 1 0.20
A,C,D 1 0.20
A,D,E 1 0.20
B,E,F 1 0.20
Result A,B,D,E,AD
Frequent itemset we can find for min_Sup of 50%
Items Frequency Support
A,D 3 0.60
Association Mining (X => Y)
A=>D Confidence = Support (A and D)/ Support (A)
1
100%
D=>A Confidence = Support (A and D)/ Support (D)
0.75
75%
Two directions of these frequent patterns
Help in Decision Making
Find the frequent itemsets and generate association rules on the below dataset
Assume that minimum support threshold (s = 33.33%) and minimum confident threshold (c = 60%)
Dataset
Transaction Items
T1 HOT DOGS, BUN, KETCHUP
T2 HOT DOGS, BUN
T3 HOT DOGS, COKE, CHIPS
T4 CHIPS, COKE
T5 CHIPS, KETCHUP
T6 HOT DOGS, COKE, CHIPS
Step1 - Generate 1-itemset
FREQUENCY OR
ITEMS SUPPORT COUNT SUPPPORT
HOT DOGS 4 0.67 All the items seem to have a support of >=33.33%
BUN 2 0.33
CHIPS 4 0.67
COKE 3 0.50
KETCHUP 2 0.33
Step2 -Generate 2-itemset
ITEMS FREQUENCY OR SU SUPPPORT
HOT DOGS,BUN 2 0.33 Items in black seem to have a support of >=33.33
HOT DOGS,CHIPS 2 0.33 The rest are discarded
HOT DOGS,COKE 2 0.33
HOT DOGS,KETCHUP 1 0.17
BUN,CHIPS 0 0.00
BUN,COKE 0 0.00
BUN,KETCHUP 1 0.17
CHIPS, COKE 3 0.50
CHIPS,KETCHUP 1 0.17
COKE,KETCHUP 0 0.00
Step3- Generate 3-itemset
ITEMS FREQUENCY OR SU SUPPPORT
HOT DOGS,BUN,CHIPS 0 0.00 Item in black seem to have a support of >=33.33%
HOT DOGS,BUN,COKE 0 0.00 The rest are discarded
HOT DOGS,BUN,KETCHUP 1 0.17 HOT DOGS
BUN,CHIPS,COKE 0 0.00 BUN
BUN,CHIPS, KETCHUP 0 0.00 Frequent dataset = CHIPS
BUN,COKE,KETCHUP 0 0.00 COKE
CHIPS, COKE,KETCHUP 0 0.00 KETCHUP
HOTDOG,CHIPS,COKE 2 0.33 HOT DOGS,BUN
HOT DOGS,CHIPS
HOT DOGS,COKE
CHIPS, COKE
HOTDOG,CHIPS,COKE
Generating Association Rules
x=>y Support ( X and Y)/Support (X)
Item set Confidence Confidence (%)
Hotdogs => Bun 0.50 50%
Bun =>Hotdogs 1.00 100%
Hotdogs => Chips 0.50 50% Item in black seem to have a Confidence of >=60
Chips => Hotdogs 0.50 50% Thus 8 of them have strong Association rules.
Hotdogs => Coke 0.50 50%
Coke => HotDogs 0.67 67%
Chips => Coke 0.75 75%
Coke => Chips 1.00 100%
Hotdog, Chips => Coke 1.00 100%
Coke => Hotdog, chips 0.67 67%
Hotdog, Coke => Chips 1.00 100%
Chips => Hotdog, Coke 0.50 50%
Chips, Coke => Hotdog 0.67 67%
Hotdog => Chips, Coke 0.50 50%
Lift
nt threshold (c = 60%)
o have a support of >=33.33%. Hence all items are included in frequent dataset
to have a support of >=33.33%. Hence those items are included in frequent dataset
o have a support of >=33.33%. Hence one item is included in frequent dataset
HOT DOGS
HOT DOGS,BUN
HOT DOGS,CHIPS
HOT DOGS,COKE
CHIPS, COKE
HOTDOG,CHIPS,COKE
o have a Confidence of >=60%.
strong Association rules.