Chapter 6 Tutorial
Chapter 6 Tutorial
Tutorial
Q6
A database has 5 transactions. Let min sup = 60%
and min conf = 80%.
Q6.a
Apriori algorithm
Q6.a
FB-Growth algorithm
1. Scan DB once, find frequent 1-itemset (single
item pattern) their support => 3
M
After
checking
support
TID
T100
T200
T300
T400
T500
items bought
(ordered) Frequent items
{M, O, N, K, E, Y}
K,E,M,O,Y
{D, O, N, K, E, Y }
K,E,O,Y
{M, A, K, E}
K,E,M
{M, U, C, K, Y}
K, M, Y
{C, O, O, K, I ,E}
K,E,O
Q6.a
FB-Growth algorithm
Generate FB-tree
Q6.b
buys(X,k) buys(X,o) => buys(X, e)
[60%,100%]
[60%,100%]
Exercise 1
Support ( A B ) P ( A B )
Confidence( A B) P( B A)
Confidence( A B ) P ( B A)
support ( A B ) support_count ( A B)
support ( A)
support_count ( A)
Exercise 2
Activity
a dataset has eight transactions. Let minimum
support = 50 %.
Find all frequent itemsets using FP-Growth
TID
Item bought
T1
{W, O, R, N}
T2
{W, T, U, G}
T3
{X , T, U, G}
T4
{S ,N, T, U, G}
T5
{B ,R, G, T, D}
T6
{T, X, I, L, U}
T7
{G, U, R, T, X}
T8
{X, O, N, G, T}