horizontal format data mining with extended bitmaps
TRANSCRIPT
Question?
• Is it possible to leverage benefits of vertical data formats in combination with efficiencies of bitmap operations to mine association rules in a distributed environment.
Association Rule Mining??
• Finding Interesting Relationships between the variables.
• Finding the subset that is common to a chosen minimum number of the itemsets from the set of itemsets.
• Pattern Recognition.
• Explained By Market Basket Analysis.
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
Sample (Toy ) Data
Set
Apriori
• Fundamental Algorithm for Association Rule Mining.
• Mines frequent patterns from a horizontal data format which represents the items categorized into particular transactions.
• i-th stage identifies all frequent i-element sets.
• Two steps: • > Candidate generation.• > Candidate counting.
Vertical Form
• Transactions categorized into particular items.
• Vertical format data mining only has to parse the dataset once to get the itemsets.
• For the itemset generation from the 2nd itemset it only needs to refer the previous itemset.
• Eliminates parsing through the dataset each time to count the frequency of itemsets, for each round.
• More efficient than its horizontal form.
BitMaps
• Compactly store individual bits.
• Exploit bit-level parallelism effectively.
• 0’s and 1’s.
• 1 indicates existence.
Combined?
• Algorithm takes a horizontal data set.
• With a one pass of the data set construct a bit map based data structure.
• This structure is in vertical format.
• The structure facilitates efficient mining of association rules.
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
Sample (Toy ) Data
Set
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
Sample (Toy ) Data
Set
Horizontal
Format
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I1
I2
I4
I5
Ordered Item
Array
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I2
1
I1
I2
I4
I5
1
1
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I2
1
I5
1
I5
1
I1
I2
I4
I5
1
1
1
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I2
1
I5
1
I5
1
I1
I2
I4
I5
1
1
1
Master Array
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I2
1
I5
1
I5
1
I1
I2
I4
I5
1
1
1
Master Array
Associated
Items
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I2
1
I5
1
I5
1
Master Array
Associated
Items
Bitmap
I1
I2
I4
I5
1
1
1
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I2
1
I5
1
I5
1
I1
I2
I4
I5
1
2
1
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I1 I2
I2
1
I5
1
I5
1
I4
I5
I4
0
0 1
1
2
1
1
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I1 I2
I2
1
I5
1
I5
1
I4
I5
I4
0
0 1
2
2
1
1
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I1I2
I2
1
I5
1
I5
1
I4
I5
I4
0
0 1
1 0
2
3
1
2
TID Item ID’s
T100 I1, I2, I5
T200 I2, I4
T300 I1, I2
T400 I2, I5
I1I2
I2
1
I5
1
I5
1
I4
I5
I4
0
0 1
1 0
Final
Data
Structure
1 0
2
4
1
2
I1I2
I2
1
I5
1
I5
1
I4
I5
I4
0
0 1
1 0
1 0
2
4
1
2
Counting
Frequent Item
Sets
No. of Items Frequent Item Sets
1 I1, I2, I5
2 I1-I2, I2-I5
3 -
Minimum Support = 2
I1I2
I2
1
I5
1
I5
1
I4
I5
I4
0
0 1
1 0
1 0
2
4
1
2
Counting
Frequent Item
Sets
No. of Items Frequent Item Sets
1 I1, I2, I5
2 I1-I2, I2-I5
3 -
Minimum Support = 2
1
0
0
0
0
Results
Insights
• The algorithm performs better than Apriori in most scenarios.
• Data structure generation dominates the total time in most cases.
• As an aside…
• Can this be made to a distributed mining algorithm?
Turns out this can be done rather easily.
Algorithm lends to map reduce like distributed processing..
Each master array index is self contained..
So can be mined in parallel.
Data structure generation Map phase
Result accumulation -> Reduce phase
I1 I2
1
I5
1
1 0
2
What Does Future Hold?
• Make this distributed.
• Java not the best of options. Use C so we can control memory allocations the way we want.
• Experiment with bitmap compression techniques.
Summary