Frequent Pattern Mining��(Advanced)
1
1
Advanced Frequent Pattern Mining
2
Research on Pattern Mining: A Road Map
3
Advanced Frequent Pattern Mining
4
Mining Multiple-Level Association Rules
5
uniform support
Milk
[support = 10%]
2% Milk
[support = 6%]
Skim Milk
[support = 4%]
Level 1
min_sup = 5%
Level 2
min_sup = 5%
Level 1
min_sup = 5%
Level 2
min_sup = 3%
reduced support
Multi-level Association: Flexible Support and Redundancy filtering
The first rule is an ancestor of the second rule
6
Advanced Frequent Pattern Mining
7
Mining Multi-Dimensional Association
buys(X, “milk”) ⇒ buys(X, “bread”)
age(X,”19-25”) ∧ occupation(X,“student”) ⇒ buys(X, “coke”)
age(X,”19-25”) ∧ buys(X, “popcorn”) ⇒ buys(X, “coke”)
8
Advanced Frequent Pattern Mining
9
Mining Quantitative Associations
Techniques can be categorized by how numerical attributes, such as age or salary are treated
Sex = female => Wage: mean=$7/hr (overall mean = $9)
10
Static Discretization of Quantitative Attributes
11
cuboid correspond to the
predicate sets
(income)
(age)
()
(buys)
(age, income)
(age,buys)
(income,buys)
(age,income,buys)
Quantitative Association Rules Based on Statistical Inference Theory [Aumann and Lindell@DMKD’03]
(Sex = female) => Wage: mean=$7/hr (overall mean = $9)
12
Advanced Frequent Pattern Mining
13
Negative and Rare Patterns
14
Defining Negative Correlated Patterns (I)
sup(X U Y) < sup (X) * sup(Y)
s(A U B) = 0.005, s(A) * s(B) = 0.25, s(A U B) < s(A) * s(B)
s(A U B) = 1/105, s(A) * s(B) = 1/103 * 1/103, s(A U B) > s(A) * s(B)
15
Defining Negative Correlated Patterns (II)
(P(A|B) + P(B|A))/2 = (0.01 + 0.01)/2 < є
16
Advanced Frequent Pattern Mining
17
Constraint-based (Query-Directed) Mining
18
Constraints in Data Mining
19
Meta-Rule Guided Mining
P1(X, Y) ^ P2(X, W) => buys(X, “iPad”)
age(X, “15-25”) ^ profession(X, “student”) => buys(X, “iPad”)
P1 ^ P2 ^ … ^ Pl => Q1 ^ Q2 ^ … ^ Qr
20
Constraint-Based Frequent Pattern Mining
21
Pattern Space Pruning with Anti-Monotonicity Constraints
22
TID | Transaction |
10 | a, b, c, d, f |
20 | b, c, d, f, g, h |
30 | a, c, d, e, f |
40 | c, e, f, g |
TDB (min_sup=2)
Item | Profit |
a | 40 |
b | 0 |
c | -20 |
d | 10 |
e | -30 |
f | 30 |
g | 20 |
h | -10 |
Pattern Space Pruning with Monotonicity Constraints
23
TID | Transaction |
10 | a, b, c, d, f |
20 | b, c, d, f, g, h |
30 | a, c, d, e, f |
40 | c, e, f, g |
TDB (min_sup=2)
Item | Profit |
a | 40 |
b | 0 |
c | -20 |
d | 10 |
e | -30 |
f | 30 |
g | 20 |
h | -10 |
Data Space Pruning with Data Anti-monotonicity
24
TID | Transaction |
10 | a, b, c, d, f, h |
20 | b, c, d, f, g, h |
30 | b, c, d, f, g |
40 | c, e, f, g |
TDB (min_sup=2)
Item | Profit |
a | 40 |
b | 0 |
c | -20 |
d | -15 |
e | -30 |
f | -10 |
g | 20 |
h | -5 |
Pattern Space Pruning with Succinctness
25
Naïve Algorithm: Apriori + Constraint
26
Database D
Scan D
C1
L1
L2
C2
C2
Scan D
C3
L3
Scan D
Constraint:
Sum{S.price} < 5
Constrained Apriori : Push a Succinct Constraint Deep
27
Database D
Scan D
C1
L1
L2
C2
C2
Scan D
C3
L3
Scan D
Constraint:
min{S.price } <= 1
not immediately
to be used
Constrained FP-Growth: Push a Succinct Constraint Deep
28
Constraint:
min{S.price } <= 1
Remove
infrequent
length 1
FP-Tree
1-Projected DB
No Need to project on 2, 3, or 5
Constrained FP-Growth: Push a Data Anti-monotonic Constraint Deep
29
Constraint:
min{S.price } <= 1
FP-Tree
Single branch, we are done
Remove from data
Constrained FP-Growth: Push a Data Anti-monotonic Constraint Deep
30
Constraint:
range{S.price } > 25
min_sup >= 2
FP-Tree
TID | Transaction |
10 | a, c, d, f, h |
20 | c, d, f, g, h |
30 | c, d, f, g |
B-Projected DB
B
FP-Tree
TID | Transaction |
10 | a, b, c, d, f, h |
20 | b, c, d, f, g, h |
30 | b, c, d, f, g |
40 | a, c, e, f, g |
TID | Transaction |
10 | a, b, c, d, f, h |
20 | b, c, d, f, g, h |
30 | b, c, d, f, g |
40 | a, c, e, f, g |
Item | Profit |
a | 40 |
b | 0 |
c | -20 |
d | -15 |
e | -30 |
f | -10 |
g | 20 |
h | -5 |
Recursive
Data
Pruning
Single branch:
bcdfg: 2
Convertible Constraints: Ordering Data in Transactions
31
TID | Transaction |
10 | a, b, c, d, f |
20 | b, c, d, f, g, h |
30 | a, c, d, e, f |
40 | c, e, f, g |
TDB (min_sup=2)
Item | Profit |
a | 40 |
b | 0 |
c | -20 |
d | 10 |
e | -30 |
f | 30 |
g | 20 |
h | -10 |
Strongly Convertible Constraints
32
Item | Profit |
a | 40 |
b | 0 |
c | -20 |
d | 10 |
e | -30 |
f | 30 |
g | 20 |
h | -10 |
Can Apriori Handle Convertible Constraints?
33
Item | Value |
a | 40 |
b | 0 |
c | -20 |
d | 10 |
e | -30 |
f | 30 |
g | 20 |
h | -10 |
Pattern Space Pruning w. Convertible Constraints
34
TID | Transaction |
10 | a, f, d, b, c |
20 | f, g, d, b, c |
30 | a, f, d, c, e |
40 | f, g, h, c, e |
TDB (min_sup=2)
Item | Value |
a | 40 |
f | 30 |
g | 20 |
d | 10 |
b | 0 |
h | -10 |
c | -20 |
e | -30 |
Handling Multiple Constraints
35
What Constraints Are Convertible?
36
Constraint | Convertible anti-monotone | Convertible monotone | Strongly convertible |
avg(S) ≤ , ≥ v | Yes | Yes | Yes |
median(S) ≤ , ≥ v | Yes | Yes | Yes |
sum(S) ≤ v (items could be of any value, v ≥ 0) | Yes | No | No |
sum(S) ≤ v (items could be of any value, v ≤ 0) | No | Yes | No |
sum(S) ≥ v (items could be of any value, v ≥ 0) | No | Yes | No |
sum(S) ≥ v (items could be of any value, v ≤ 0) | Yes | No | No |
…… | | | |
Constraint-Based Mining — A General Picture
37
Constraint | Anti-monotone | Monotone | Succinct |
v ∈ S | no | yes | yes |
S ⊇ V | no | yes | yes |
S ⊆ V | yes | no | yes |
min(S) ≤ v | no | yes | yes |
min(S) ≥ v | yes | no | yes |
max(S) ≤ v | yes | no | yes |
max(S) ≥ v | no | yes | yes |
count(S) ≤ v | yes | no | weakly |
count(S) ≥ v | no | yes | weakly |
sum(S) ≤ v ( a ∈ S, a ≥ 0 ) | yes | no | no |
sum(S) ≥ v ( a ∈ S, a ≥ 0 ) | no | yes | no |
range(S) ≤ v | yes | no | no |
range(S) ≥ v | no | yes | no |
avg(S) θ v, θ ∈ { =, ≤, ≥ } | convertible | convertible | no |
support(S) ≥ ξ | yes | no | no |
support(S) ≤ ξ | no | yes | no |
Advanced Frequent Pattern Mining
38
Mining Colossal Frequent Patterns
39
Colossal Patterns: A Motivating Example
T1 = 1 2 3 4 ….. 39 40
T2 = 1 2 3 4 ….. 39 40
: .
: .
: .
: .
T40=1 2 3 4 ….. 39 40
40
Closed/maximal patterns may partially alleviate the problem but not really solve it: We often need to mine scattered large patterns!
Let the minimum support threshold σ= 20
There are frequent patterns of size 20
Each is closed and maximal
# patterns =
The size of the answer set is exponential to n
T1 = 2 3 4 ….. 39 40
T2 = 1 3 4 ….. 39 40
: .
: .
: .
: .
T40=1 2 3 4 …… 39
Then delete the items on the diagonal
Let’s make a set of 40 transactions
Colossal Pattern Set: Small but Interesting
41
Mining Colossal Patterns: Motivation and Philosophy
42
Alas, A Show of Colossal Pattern Mining!
43
Let the min-support threshold σ= 20
Then there are closed/maximal frequent patterns of size 20
However, there is only one with size greater than 20, (i.e., colossal):
α= {41,42,…,79} of size 39
T1 = 2 3 4 ….. 39 40
T2 = 1 3 4 ….. 39 40
: .
: .
: .
: .
T40=1 2 3 4 …… 39
T41= 41 42 43 ….. 79
T42= 41 42 43 ….. 79
: .
: .
T60= 41 42 43 … 79
The existing fastest mining algorithms (e.g., FPClose, LCM) fail to complete running
Our algorithm outputs this colossal pattern in seconds
Methodology of Pattern-Fusion Strategy
44
Observation: Colossal Patterns and Core Patterns
45
A colossal pattern α
D
Dα
α1
Transaction Database D
Dα1
Dα2
α2
α
αk
Dαk
Subpatterns α1 to αk cluster tightly around the colossal pattern α by sharing a similar support. We call such subpatterns core patterns of α
Robustness of Colossal Patterns
Intuitively, for a frequent pattern α, a subpattern β is a τ-core pattern of α if β shares a similar support set with α, i.e.,
where τ is called the core ratio
A colossal pattern is robust in the sense that it tends to have much more core patterns than small patterns
46
Example: Core Patterns
47
Transaction (# of Ts) | Core Patterns (τ = 0.5) |
(abe) (100) | (abe), (ab), (be), (ae), (e) |
(bcf) (100) | (bcf), (bc), (bf) |
(acf) (100) | (acf), (ac), (af) |
(abcef) (100) | (ab), (ac), (af), (ae), (bc), (bf), (be) (ce), (fe), (e), (abc), (abf), (abe), (ace), (acf), (afe), (bcf), (bce), (bfe), (cfe), (abcf), (abce), (bcfe), (acfe), (abfe), (abcef) |
Robustness of Colossal Patterns
48
Colossal Patterns Correspond to Dense Balls
49
Idea of Pattern-Fusion Algorithm
50
Pattern-Fusion: The Algorithm
51
Why Is Pattern-Fusion Efficient?
52
Pattern-Fusion Leads to Good Approximation
53
Experimental Setting
54
Experiment Results on Diagn
55
Experimental Results on ALL
56
Experimental Results on REPLACE
57
Experimental Results on REPLACE
58
Advanced Frequent Pattern Mining
59
Mining Compressed Patterns: δ-clustering
60
ID | Item-Sets | Support |
P1 | {38,16,18,12} | 205227 |
P2 | {38,16,18,12,17} | 205211 |
P3 | {39,38,16,18,12,17} | 101758 |
P4 | {39,16,18,12,17} | 161563 |
P5 | {39,16,18,12} | 161576 |
Redundancy-Award Top-k Patterns
61
Chapter 7 : Advanced Frequent Pattern Mining
62
diaper
beer
female sterile (2) tekele
Annotate patterns with semantic information
morphological info. and simple statistics
Semantic Information
Not all frequent patterns are useful, only meaningful ones …
How to Understand and Interpret Patterns?
A Dictionary Analogy
Word: “pattern” – from Merriam-Webster
Non-semantic info.
Examples of Usage
Definitions indicating
semantics
Synonyms
Related Words
Semantic Analysis with Context Models
Based on the Context Model…
Annotating DBLP Co-authorship & Title Pattern
Substructure Similarity Search
in Graph Databases
X.Yan, P. Yu, J. Han
…
…
…
…
Database:
Title
Authors
Frequent Patterns
P1: { x_yan, j_han }
Frequent Itemset
P2: “substructure search”
Pattern | { x_yan, j_han} |
Non | Sup = … |
CI | {p_yu}, graph pattern, … |
Trans. | gSpan: graph-base…… |
SSPs | { j_wang }, {j_han, p_yu}, … |
Semantic Annotations
Context Units
< { p_yu, j_han}, { d_xin }, … , “graph pattern”, �… “substructure similarity”, … >
Pattern = {xifeng_yan, jiawei_han}
Annotation Results:
Context Indicator (CI) | graph; {philip_yu}; mine close; graph pattern; sequential pattern; … |
Representative Transactions (Trans) | > gSpan: graph-base substructure pattern mining;�> mining close relational graph connect constraint; … |
Semantically Similar Patterns (SSP) | {jiawei_han, philip_yu}; {jian_pei, jiawei_han}; {jiong_yang, philip_yu, wei_wang}; … |
Advanced Frequent Pattern Mining
67
Summary
68
Ref: Mining Multi-Level and Quantitative Rules
69
Ref: Mining Other Kinds of Rules
70
Ref: Constraint-Based Pattern Mining
71
Ref: Mining Sequential Patterns
72
Mining Graph and Structured Patterns
73
Ref: Mining Spatial, Spatiotemporal, Multimedia Data
74
Ref: Mining Frequent Patterns in Time-Series Data
75
Ref: FP for Classification and Clustering
76
Ref: Privacy-Preserving FP Mining
77
Mining Compressed Patterns
78
Mining Colossal Patterns
79
Ref: FP Mining from Data Streams
80
Ref: Freq. Pattern Mining Applications
81