Lec1b Assoc Rules
Lec1b Assoc Rules
Association Rules
Market Baskets
Frequent Itemsets
A-Priori Algorithm
1
10
11
!
An association rule: {m, b} → c.
Confidence = ?
12
!
An association rule: {m, b} → c.
Confidence = # baskets containing {m,b,c} / #
baskets containing {m,b} = 2/4 = 0.5
13
14
16
Item
Item
Item Basket 1 Example: every line
Item
Item in a text document
Item
Item Basket 2
contains all items of a
Item given basket.
Item
Item Basket 3
Item
Item
Etc.
17
18
19
21
22
23
24
25
Counts of
pairs of
frequent
items
Pass 1 Pass 2 26
27
! C1 = all items
! Fk = members of Ck with support ≥ s.
28
! C1 = all items
! Fk = members of Ck with support ≥ s.
! Ck +1 = (k +1) -sets, each k of which is in Fk .
(e.g. {a,b,c,d} is in Ck only if {b,c,d}, {a,c,d}, {a,b,d},
{a,b,c} are all frequent )
29
! C1 = all items
! Fk = members of Ck with support ≥ s.
! Ck +1 = (k +1) -sets, each k of which is in Fk .
(e.g. {a,b,c,d} is in Ck only if {b,c,d}, {a,c,d}, {a,b,d},
{a,b,c} are all frequent )
! When do we stop?
30
! C1 = all items
! Fk = members of Ck with support ≥ s.
! Ck +1 = (k +1) -sets, each k of which is in Fk .
(e.g. {a,b,c,d} is in Ck only if {b,c,d}, {a,c,d}, {a,b,d},
{a,b,c} are all frequent )
! When do we stop? When Ck +1 is empty.
31
32