You are on page 1of 3

Part A

A database has five transactions. Let min sup = 60% and min conf = 75%.
TiD Items-bought
T100 E, E, K, K, M, N, N, O, Y, Y
T200 D, D, D, E, K, N, N, O, O, Y
T300 A, E, E, K, K, K, M, M, M
T400 C, C, C, E, M, O, U, U, U, Y
T500 C, E, K, I, I, I, O, O, O
Table 1: Init database
Database scans once to generate frequent 1 itemsets. Using absolute
support, the total Tid is 5. Min sup = 60%. So anything less than 60% will
be gone for the next generated itemset.

Itemset sup sup percentage


{A} 1 20%
{C} 2 40%
{D} 1 20%
{E} 5 100%
{I} 1 20%
{K} 4 80%
{M} 3 60%
{N} 2 40%
{O} 4 80%
{U} 1 20%
{Y} 3 60%

Table 2: First itemset table


Remove cells less than 60%.

1
Itemset sup sup percentage
{E} 5 100%
{K} 4 80%
{M} 3 60%
{O} 4 80%
{Y} 3 60%

Table 3: Removed data from first itemset


Database will now scan for the second time. The possible combinations is 10. Using
absolute, each combination is counted per TiD.

Itemset sup sup percentage


{E,K} 4 80%
{E, M} 3 60%
{E, O} 4 80%
{E, Y} 3 60%
{K, M} 2 40%
{K, O} 3 60%
{K, Y} 2 40%
{M, O} 2 40%
{M, Y} 2 40%
{O, Y} 3 60%

Table 4: Second itemset table


Remove cells less than 60%.

Itemset sup sup percentage


{E,K} 4 80%
{E, M} 3 60%
{E, O} 4 80%
{E, Y} 3 60%
{K, O} 3 60%
{O, Y} 3 60%

Table 5: Removed data from second itemset

Generate third itemset.


{E, K}, {K, O}, {E, O} = {E, K, O}
{E, O},{E, Y},{O, Y} = {E, O, Y}

2
Itemset sup sup percentage
{E, K, O} 3 60%
{E, O, Y} 3 60%

Table 6: Third itemset table


Frequent 4 itemset cannot be found because {K, O, Y} and {E, K, Y} are missing. So all
frequency has been found.

Part B
Highest itemsets are {E, K, O} and {E, O, Y}
Conf idence : X ∩ Y → Z
Association Rules from {E, K, O}

1. Conf idence : E ∩ K → O
Confidence = # {E, K, O} / # {E, K} = 3/4

1. Conf idence : E ∩ O → K
Confidence = # {E, K, O} / # {E, O} = 3/4

1. Conf idence : K ∩ O → E
Confidence = # {E, K, O} / # {K, O} = 3/3

1. Conf idence : E ∩ O → Y
Confidence = # {E, O, Y} / # {E, O} = 3/4

1. Conf idence : E ∩ Y → O
Confidence = # {E, O, Y} / # {E, Y} = 3/3

1. Conf idence : O ∩ Y → E
Confidence = # {E, O, Y} / # {O, Y} = 3/3

All 6 association rules are strong, meaning that customers that purchased
two products in E, K, O are like to purchase one and same goes for
customers who purchase two items in E, O, Y are also likely to purchase
one.

You might also like