Monday, February 4, 2013

Association Rules - XLMiner(Repost)


Association Rules - Example

Data Size: Different versions of XLMiner™  have varying limits on size of data. The size of data depicted in the example below may not be supported by your version. Refer to Data Handling Specifications for details.
  1. Open the file Associations.xls in Excel. 
  2. From the XLMiner™ menu, select Affinity -> Association rules. The Association Rules dialog box appears. XLMiner™ judges that this is a binary matrix because all the rows contain zeros and ones. So it selects input data format as "Data in binary matrix format". (Otherwise it selects "Data in item list format". If we still want XLMiner™ to treat our data set as a binary matrix, we can select the option "Data in binary matrix format". XLMiner™ will then ask for a confirmation, treat all non-zero values in the data set as 1s and proceed).
  3. Make the selections as shown above and click on Finish button. We will get the following results:
All rules are presented in the table with confidence, support and the lift ratio for each rule is given. We can sort the rules by clicking on the column headings.
Interpreting the Results
Rule #1 says that if an Italian cookbook and a Youthbook are bought, a cookbook will also be bought.  Click on the cell containing the rule # to see the rule displayed above the table.   
This particular rule has confidence of 100%, meaning that, of the people who bought an Italian cookbook and a Youthbook, all (100%) bought cookbooks as well.  "Support (a)" indicates that it has support of 118 transactions, meaning that 118 people bought an Italian cookbook and a Youthbook, total.  "Support (c)" indicates the number of transactions involving the purchase of cookbooks, total.  (This is a piece of side information -- it is not involved in calculating the confidence or support for the rule itself.)  "Support (a U c)" is the number of transactions where an Italian cookbook and a Youthbook as well as a cookbook were bought. 
"Lift ratio" indicates how much more likely we are to encounter a cookbook transaction if we consider just those transactions where an Italian cookbook and a Youthbook is purchased, as compared to the entire population of transactions -- it's the confidence divided by support (c) where the latter is expressed as a percentage. For Rule#1, the confidence is 100%. support (c) (in percentage)= (862/2000)*100 = 43.1. So, the  Lift ratio = 100/43.1 = 2.320186.

No comments:

Post a Comment