Open In App

Association Rule

Association rule mining finds interesting associations and relationships among large sets of data items. This rule shows how frequently a itemset occurs in a transaction. A typical example is a Market Based Analysis. Market Based Analysis is one of the key techniques used by large relations to show associations between items.It allows retailers to identify relationships between the items that people buy together frequently. Given a set of transactions, we can find rules that will predict the occurrence of an item based on the occurrences of other items in the transaction.
TID Items
1 Bread, Milk
2 Bread, Diaper, Beer, Eggs
3 Milk, Diaper, Beer, Coke
4 Bread, Milk, Diaper, Beer
5 Bread, Milk, Diaper, Coke
Before we start defining the rule, let us first see the basic definitions. Support Count() – Frequency of occurrence of a itemset.
Here ({Milk, Bread, Diaper})=2 
Frequent Itemset – An itemset whose support is greater than or equal to minsup threshold. Association Rule – An implication expression of the form X -> Y, where X and Y are any 2 itemsets.
Example: {Milk, Diaper}->{Beer} 
Rule Evaluation Metrics – Example – From the above table, {Milk, Diaper}=>{Beer}
s= ({Milk, Diaper, Beer})  |T|
= 2/5
= 0.4

c= (Milk, Diaper, Beer) (Milk, Diaper)
= 2/3
= 0.67

l= Supp({Milk, Diaper, Beer})  Supp({Milk, Diaper})*Supp({Beer})
= 0.4/(0.6*0.6)
= 1.11 
The Association rule is very useful in analyzing datasets. The data is collected using bar-code scanners in supermarkets. Such databases consists of a large number of transaction records which list all items bought by a customer on a single purchase. So the manager could know if certain groups of items are consistently purchased together and use this data for adjusting store layouts, cross-selling, promotions based on statistics.
Article Tags :