0
1.6kviews
Discuss the apriori algorithm for discovering frequent itemsets.

Discuss the apriori algorithm for discovering frequent itemsets. Apply apriori algorithm to the following data set. Use 0.3 for the minimum support value. The set of items is {strawberry, litchi, oranges, butter fruit, vanilla, Banana, apple}. Use 0.3 for the minimum support value.

2
262views

## Apriori Algorithm to Discover Frequent Itemsets.

The given Minimum Support Value = 0.3

The Number of Transactions = 10

Therefore,

The Minimum Support = $0.3 \times 10 = 3$

Step 1 - Calculate the Minimum Count for each Item.

Therefore,

Items Minimum Count
Strawberry 5
Litchi 4
Orange 4
Butter fruit 3
Vanilla 2
Banana 3
Apple 2

Step 2 - Delete the items that do not have a minimum support count of 3.

Therefore, Items Vanilla and Apple are deleted.

Items Minimum Count
Strawberry 5
Litchi 4
Orange 4
Butter fruit 3
Banana 3

Step 3 - Combine 2-items and find out the Minimum Count of the occurrences of the 2-items.

Items Minimum Count
Strawberry, Litchi 4
Strawberry, Orange 3
Strawberry, Butter fruit 1
Strawberry, Banana 0
Litchi, Orange 3
Litchi, Butter fruit 0
Litchi, Banana 0
Orange, Butter fruit 0
Orange, Banana 1
Butter fruit, Banana 1

Step 4 - Delete the 2-items that do not have a minimum support count of 3.

Therefore,

Items Minimum Count
Strawberry, Litchi 4
Strawberry, Orange 3
Litchi, Orange 3

Step 5 - Combine 3-items and find out the Minimum Count of the occurrences of the 3-items.

Items Minimum Count
Strawberry, Litchi, Orange 3
Strawberry, Litchi, Butter fruit 0
Strawberry, Litchi, Banana 0
Strawberry, Orange, Butter fruit 0
Strawberry, Orange, Banana 0
Litchi, Orange, Butter fruit 0
Litchi, Orange, Banana 0

Now, got the only item-set {Strawberry, Litchi, Orange} that is frequent.

Step 6 - Generate Association Rules from the frequent itemset discovered in the above step - 5.

{Strawberry, Litchi} => {Orange}

$$Confidence = \frac {support \{Strawberry, Litchi, Orange\}}{support \{Strawberry, Litchi\}} = \frac 34 \times 100 = 75\ \%$$

{Strawberry, Orange} => {Litchi}

$$Confidence = \frac {support \{Strawberry, Litchi, Orange\}}{support \{Strawberry, Orange\}} = \frac 33 \times 100 = 100\ \%$$

{Litchi, Orange} => {Strawberry}

$$Confidence = \frac {support \{Strawberry, Litchi, Orange\}}{support \{Litchi, Orange\}} = \frac 33 \times 100 = 100\ \%$$

{Strawberry} => {Litchi, Orange}

$$Confidence = \frac {support \{Strawberry, Litchi, Orange\}}{support \{Strawberry\}} = \frac 35 \times 100 = 60\ \%$$

{Litchi} => {Strawberry, Orange}

$$Confidence = \frac {support \{Strawberry, Litchi, Orange\}}{support \{Litchi\}} = \frac 34 \times 100 = 75\ \%$$

{Orange} => {Strawberry, Litchi}

$$Confidence = \frac {support \{Strawberry, Litchi, Orange\}}{support \{Orange\}} = \frac 34 \times 100 = 75\ \%$$

In the question Minimum Confidence Threshold is not mentioned.

Therefore, if consider Confidence Threshold is 60 % then this shows that all the above Association Rules are Strong.