Вы находитесь на странице: 1из 18

Maximal and Closed Patterns

Effectiveness of Freq Pat Mining


Too many patterns!
A pattern a1a2an contains 2n-1 subpatterns Understanding many patterns is difficult or even impossible for human being

Non-focused mining
A manager may be only interested in patterns involving some items (s)he manages A user is often interested in patterns satisfying some constraints
Jian Pei: Data Mining -- Maximal and Closed Patterns 2

Itemset Lattice
ABCD ABC AB A AC ABD BC B {} ACD AD C BCD BD D CD

Tid transaction 10 20 30 40 50 ABD ABC AD ABCD CD


Min_sup=2

Length Frequent itemsets 1 2 3 A, B, C, D AB, AC, AD, BC, BD, CD ABC, ABD, ACD
3

Jian Pei: Data Mining -- Maximal and Closed Patterns

Max-Patterns and Border


Tid transaction ABCD ABC AB A AC ABD BC B {} ACD AD C BCD BD D 10 20 30 CD 40 50 ABD ABC AD ABCD CD
Min_sup=2

Length Frequent itemsets 1 2 3 A, B, C, D AB, AC, AD, BC, BD, CD ABC, ABD
4

Jian Pei: Data Mining -- Maximal and Closed Patterns

Borders and Max-patterns


Max-patterns: borders of frequent patterns
Any subset of max-pattern is frequent Any superset of max-pattern is infrequent ABCD Cannot generate rules
ABC AB A AC ABD BC B {}
Jian Pei: Data Mining -- Maximal and Closed Patterns 5

ACD AD C

BCD BD D CD

MaxMiner: Mining Max-patterns


1st scan: find frequent items
A, B, C, D, E
Tid 10 20 30 Items A,B,C,D,E B,C,D,E, A,C,D,F

2nd scan: find support for


AB, AC, AD, AE, ABCDE BC, BD, BE, BCDE CD, CE, CDE, DE,

Min_sup=2

Potential max-patterns

Since BCDE is a max-pattern, no need to check BCD, BDE, CDE in later scan Bayardo, SIGMOD98
Jian Pei: Data Mining -- Maximal and Closed Patterns 6

Patterns and Support Counts


ABCD ABC:2 AB:3 AC:2 A:4 ABD:2 BC:3 B:4 {} ACD AD:3 C:3 BCD BD:2 D:4 Tid transaction 10 20 30 CD:2 40 50 ABD ABC AD ABCD CD
Min_sup=2

Len Frequent itemsets 1 2 3 A:4, B:4, C:3, D:4 AB:3, AC:2, AD:3, BC:3, BD:2, CD:2 ABC:2, ABD:2
7

Jian Pei: Data Mining -- Maximal and Closed Patterns

Frequent Closed Patterns


For frequent itemset X, if there exists no item y not in X s.t. every transaction containing X also contains y, then X is a frequent closed pattern
acdf is a frequent closed pattern Min_sup=2
TID 10 20 30 40 50
Jian Pei: Data Mining -- Maximal and Closed Patterns

Concise rep. of freq pats


Can generate non-redundant rules

Items a, c, d, e, f a, b, e c, e, f a, c, d, f c, e, f
8

Reduce # of patterns and rules N. Pasquier et al. In ICDT99

CLOSET for Frequent Closed Patterns


Flist: list of all freq items in support asc. order
Flist: d-a-f-e-c Min_sup=2
TID 10 20 30 40 50 Items a, c, d, e, f a, b, e c, e, f a, c, d, f c, e, f

Divide search space


Patterns having d Patterns having d but no a, etc.

Find frequent closed pattern recursively

Every transaction having d also has cfa cfad is a frequent closed pattern

PHM00
Jian Pei: Data Mining -- Maximal and Closed Patterns 9

The CHARM Method


Use vertical data format: t(AB)={T1, T12, } Derive closed pattern based on vertical intersections
t(X)=t(Y): X and Y always happen together t(X)t(Y): transaction having X always has Y

Use diffset to accelerate mining


Only keep track of difference of tids t(X)={T1, T2, T3}, t(Xy )={T1, T3} Diffset(Xy, X)={T2}
Jian Pei: Data Mining -- Maximal and Closed Patterns 10

Closed and Max-patterns


Closed pattern mining algorithms can be adapted to mine max-patterns
A max-pattern must be closed

Depth-first search methods have advantages over breadth-first search ones


Why?

Jian Pei: Data Mining -- Maximal and Closed Patterns

11

Condensed Freq Pattern Base


Practical observation: in many applications, a good approximation on support count could be good enough
Support=10000 Support in range 10000 1%

Making frequent pattern mining more realistic


A small deviation has a minor effect on analysis Condensed FP-base leads to more effective mining Computing a condensed FP-base may lead to more efficient mining

Jian Pei: Data Mining -- Maximal and Closed Patterns

12

Condensed FP-base Mining


Compute a condensed FP-base with a guaranteed maximal error bound. Given: a transaction database, a user-specified support threshold, and a user-specified error bound Find a subset of frequent patterns & a function
Determine whether a pattern is frequent Determine the support range

Pei et al. ICDM02


Jian Pei: Data Mining -- Maximal and Closed Patterns 13

An Example
Support threshold: min_sup =1 Error bound: k = 2

Jian Pei: Data Mining -- Maximal and Closed Patterns

14

Another Base
Support threshold: min_sup = 1 Error bound: k = 2

Jian Pei: Data Mining -- Maximal and Closed Patterns

15

Approximation Functions
NOT unique
Different condensed FP-bases have different approximation function

Optimization on space requirement


The less space required, the better compression effect compression ratio

Jian Pei: Data Mining -- Maximal and Closed Patterns

16

Summary
Effectiveness is a critical issue in frequent pattern mining Mining non-redundant patterns
Max-patterns and closed patterns

Mining frequent patterns with constraints


Anti-monotonic, monotonic, succinct, and convertible constraints

Jian Pei: Data Mining -- Maximal and Closed Patterns

17

Reading List and Exercises


J. Pei, J. Han, and R. Mao. CLOSET: an efficient algorithm for mining frequent closed itemsets. DMKD 2000 ABC:2 Is it possible to use the lower bounds as the AB:3 AC:2 concise representation A:4 of frequent patterns? How?
Jian Pei: Data Mining -- Maximal and Closed Patterns

ABCD ABD:2 BC:3 ACD AD:3 BCD BD:2 CD:2

B:4 {}

C:3

D:4

18

Вам также может понравиться