0% found this document useful (0 votes)
92 views2 pages

Association Rule Mining-Hands - On

The document discusses determining frequent items purchased together from sales transaction data to develop association rules. It defines support as the percentage of transactions containing an item or set of items. Confidence is the percentage of transactions containing item B among those containing item A. Association rules show the support and confidence that if item A is purchased, then items B and C will also be purchased.

Uploaded by

Archana Somarapu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views2 pages

Association Rule Mining-Hands - On

The document discusses determining frequent items purchased together from sales transaction data to develop association rules. It defines support as the percentage of transactions containing an item or set of items. Confidence is the percentage of transactions containing item B among those containing item A. Association rules show the support and confidence that if item A is purchased, then items B and C will also be purchased.

Uploaded by

Archana Somarapu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Frequency of Frequent Items

 You have a list of sales transactions that happened over the last 1 hour
 The goal is to determine patterns in the items purchased
 You want to develop an association rule among the items ... How will you do that ?

Approach

 To reach the end goal , the first step taken is to determine the support for a given set of items.
For Example , you see Bread and Butter in 60% of the transactions. Is that considered frequent
? What if the frequency was 20% or 80 % ?

Support - Explained
 Support is the number of times you see an item or items over a list of all the transactions.

Representing Support

 Support of two items A and B is represented as

support(A->B) = P(AUB)

Support - Elaborated
The support of A -> B is the percentage of transactions that contain both A and B.

 A could be Mobile Chargers


 B could be Adapters

Support of A -> B = Number of Transactions that have both A and B / Total Number of
Transactions

Confidence - Explained

 Confidence is a directional relationship between two or more items.


 It is represented in the following manner

confidence(A->B) = P(B|A)

 We can read this as the confidence of item A leading to item B is the probability of B given A.

Another way of writing confidence is

confidence(A->B) = support(AUB) / support(A)


The confidence of A->B can be explained as percentage of baskets containing A and B divided by the
percentage of baskets that containing just A.

Association Rule
Getting the support and confidence are the pre-requisites for Association Rule.
After getting the metrics , we can form the Association Rule.

vanilla wafers -> bananas, whipped cream


[support=10%, confidence=80%]

Interpreting the above rule , 10% of the carts or baskets have vanilla wafers , banana and whipped
cream together.
80% of the customers who brought vanilla wafers also purchased bananas and whipped cream

Components of Association Rule


Let us take the rule

item A -> item B , item C


support 10 % , confidence 60%

 Left-hand side is called antecedent


 Right-hand side is called consequent
 Items A , B and C are purchased in 10% of the transactions
 Among all the transactions that have item A , 60% of the transactions have items B and C.

Upward Closure Property


 The property states that a given itemset can be considered frequent if all the items in the
itemset are also frequent

Another way of describing this is

 There is not much value in calculating the support of any itemset if the all
the itemsets are not frequent
 This property will help us find frequent item sets faster

You might also like