An Example of Association Rule Mining
The association rule mining and Apriori algorithm are not easy to comprehend.
The following example tries to help the understanding.
The example shows how the Apriori algorithm works and the second example gives a real-world example of an Apriori application.
There are nine transactions, T100, T200, .., and T900, and five items, I1, I2, .., and I5.
The 1-itemset means there is one item in each itemset.
The sup_count (support count) means the number of the item appearing in transactions.
For example, the sup_count of {I4} is 2 because I4 appears in T200 and T400.
|
|
|
There are ten 2-itemsets according to the combination:
5C2 = (5!) / (3!×2!) = 10
The sup_count of {I1, I2} is 4 because the itemset {I1, I2} appears in T100, T400, T800, and T900 and the sup_count of {I2, I5} is 2 because the itemset {I2, I5} appears in T100 and T800.
The pruning removes an itemset whose sup_count is less than the min_sup , 2.
|
|
|
The itemsets {I1, I2, I4}, {I2, I3, I5}, are {I1, I3, I5} are not in the frequent 3-itemsets because each of their sup_count
, 1, is less than the min_sup
, 2.
I never think of the future - it comes soon enough.
— Albert Einstein
|