Professional Documents
Culture Documents
Outline
Gii thiu Lut kt hp ng dng
Outline
Gii thiu Lut kt hp ng dng
Transactions
TID Produce 1 MILK, BREAD, EGGS 2 BREAD, SUGAR 3 BREAD, CEREAL 4 MILK, BREAD, SUGAR 5 MILK, CEREAL 6 BREAD, CEREAL 7 MILK, CEREAL 8 MILK, BREAD, CEREAL, EGGS 9 MILK, BREAD, CEREAL
Transaction
TID Products 1 A, B, E 2 B, D 3 B, C 4 A, B, D 5 A, C 6 B, C 7 A, C 8 A, B, C, E 9 A, B, C
Instances = Transactions
Transaction
TID Products 1 A, B, E 2 B, D 3 B, C 4 A, B, D 5 A, C 6 B, C 7 A, C 8 A, B, C, E 9 A, B, C
nh ngha
Item: cp thuc tnh = gi tr hay gi tr Itemset I : tp ca cc items
v d : I = {A,B,E} (th t khng quan trng)
Outline
Gii thiu Lut kt hp ng dng
10
Lut kt hp
Lut kt hp R : Itemset1 => Itemset2
Itemset1, 2 khng giao nhau v Itemset2 khng rng ngha : nu transaction c cha Itemset1 th n cng cha Itemset2
v d
A,B => E,C A => B,C
11
Lut kt hp
cho frequent set {A,B,E}, lut kt hp c th
l
A => B, E A, B => E A, E => B B => A, E B, E => A E => A, B __ => A,B,E (empty rule) hay true => A,B,E
12
tp trung vo 1 thuc tnh target nhiu thuc tnh target measures: accuracy measures: support, confidence, Lift
13
Support v Confidence
gi s lut R : I => J
sup (R) = sup (I J)
support ca itemset I J
14
Lut kt hp
cho frequent set {A,B,E}, lut
15
Lut kt hp
cho frequent set {A,B,E}, lut kt hp
16
Tm lut mnh
nhng lut c sup >= minsup v conf >= minconf
sup(R) >= minsup and conf (R) >= minconf
tm tt c frequent itemsets
17
Tm itemsets
gii thut Apriori (Agrawal & Srikant, 1993) tng : s dng tp 1-item sinh ra tp 2item, tp 2-item dng sinh ra tp 3-item,
nu (A B) l frequent itemset, th (A) v (B) phi l frequent itemsets nu X l frequent k-item set, th tt c (k-1)-item subsets ca X cng l frequent tnh k-item set bng cch merge (k-1)-item sets
18
Sinh lut kt hp
2 bc :
xc nh frequent itemsets vi gii thut Apriori cho mi frequent itemset I
cho mi subset J ca I xc nh tt c cc lut kt hp : I-J => J
19
20
Lc lut kt hp
tp d liu ln => s lut sinh ra rt ln mc d s dng Confidence v Support tm cch lc hay chn la cc lut hu dng : s dng cc o khc (tham kho ti liu ca Howard Hamilton) mining lut kt hp
22
Outline
Gii thiu Lut kt hp ng dng
23
ng dng
Market basket analysis
Store layout, client offers
Wal-Mart knows that customers who buy Barbie dolls have a 60% likelihood of buying one of three types of candy bars. What does Wal-Mart do with information like that? 'I don't have a clue,' says Wal-Mart's chief of merchandising, Lee Scott See - KDnuggets 98:01 for many ideas www.kdnuggets.com/news/98/n01.html Diapers and beer urban legend Finding unusual events
WSARE What is Strange About Recent Events
24