Find the item sets in the following database of nine transactions, with a minimum support 50% and
confidence 50%.
Solution:
Here there are 4 transactions and minimum support is 50% and confidence is 50%.
50 x 4 /100 = 2 that means every item (i.e. A, B, C, D and F) must be present at least in 2 transactions.
Step 1: Now, we shall consider the single subset. Scan D for count of each candidate. The candidate list
is {A, B, C, D, E, F} and find the support
C1 =
Items Support
{A} 3
{B} 2
{C} 2
{D} 1
{E} 1
{F} 1
Now we shall eliminate those items whose support count is less than 2. So D, E and F have got
eliminated.
Step 2: Compare candidate support count with minimum support count (50%)
L1 =
C2 =
Items
{A, B}
{A, C}
{B, C}
Step 4: Scan D for count of each candidate in C2 and find the support
C2 =
Step 5: Compare candidate (C2) support count with the minimum support count
L2 =
Therefore, the association rule that can be generated from L are as shown below with the support and
confidence
Confidence can be calculated in this way that support count (here it is 2) / number of occurrences i.e.
2/3 = 0.66 and similarly 2/2 = 1.
Minimum confidence threshold is 50% (Given), then both the rules are output as the confidence is
above 50%.
Rule 1: A -> C
Rule 2: C -> A
https://www.youtube.com/watch?v=JZepOmvB514
https://www.youtube.com/watch?v=LZii6N4vGDs
fp growth algorithm
https://www.youtube.com/watch?v=gq6nKbye648