top of page

Apriori algorithm for association rules mining



We have 10 baskets of goods, as shown in the following table


The set of items is {vanilla wafers, bananas, dog food,bread, yogurt, apples, whipped cream, milk, peanut butter}.


1. Example

We are interested in only one frequent itemset {vanilla wafers , bananas}

Calculating the confidence for two proposed rules

There are four baskets (number 1,4,7, and 9) that contain both these items.

Thus, the support for either rule:

vanilla wafers -> bananas or bananas -> vanilla wafers is 4/10 = 40 %

2. Finding rules that have a confidence of 0.6 or greater for an itemset containing two items.





There are three rules where the confidence is higher than 60%


bananasapples (support = 0.2, confidence = 66.67%)

bread bananas (support = 0.3, confidence = 75%)

vanilla wafers bananas (support = 0.4, confidence = 66.67%)















Comments


bottom of page