Back to the 2021 paper

Module 2: Data Mining and Association Rule Mining

20218m

A database has five transactions. Let min_sup = 60% and min_conf = 80%.

TID Items_bought
T100 {M, O, N, K, E, Y}
T200 {D, O, N, K, E, Y}
T300 {M, A, K, E}
T400 {M, U, C, K, Y}
T500 {C, O, O, K, I, E}

(i) Find all frequent item sets using a priori algorithm.

(ii) List all the strong association rules (with support ss and confidence cc) matching the following metarule, where XX is a variable representing customers:
xtransactions,buys(X,item1)buys(X,item2)buys(X,item3) [s,c]\forall x \in \text{transactions}, \text{buys}(X, \text{item}_1) \wedge \text{buys}(X, \text{item}_2) \Rightarrow \text{buys}(X, \text{item}_3)\ [s, c]

Worked SolutionAI Assisted

(i) Frequent Itemsets via Apriori — MONKEY Dataset

Same dataset as before, min_sup = 60% (count ≥ 3), min_conf = 80%.

TID Items
T100 M, O, N, K, E, Y
T200 D, O, N, K, E, Y
T300 M, A, K, E
T400 M, U, C, K, Y
T500 C, O, K, I, E

L1 (count ≥3)

{M}:3, {O}:3, {K}:5, {E}:4, {Y}:3

L2 (count ≥3, from valid C2 candidates)

{K,M}:3, {K,O}:3, {O,E}:3, {K,E}:4, {K,Y}:3

L3

Only candidate surviving the apriori-prune test: {K,O,E} — check: {K,O}✅ {K,E}✅ {O,E}✅ all in L2 → count in DB (T100, T200, T500) = 3 → frequent.

All frequent itemsets:

{M} {O} {K} {E} {Y}
{K,M} {K,O} {O,E} {K,E} {K,Y}
{K,O,E}

(11 itemsets total — see full step-by-step derivation in Q65's solution for the same dataset.)


(ii) Strong Rules Matching the Metarule

Metarule: x,buys(X,item1)buys(X,item2)buys(X,item3) [s,c]\forall x, \text{buys}(X,\text{item}_1) \wedge \text{buys}(X,\text{item}_2) \Rightarrow \text{buys}(X,\text{item}_3)\ [s,c]

This asks specifically for rules with exactly 2 items in the antecedent and 1 item in the consequent. The only frequent itemset large enough to produce such a rule is the 3-itemset {K, O, E} (support count = 3, support = 3/5 = 60%).

We test all three possible 2→1 splits of {K, O, E}:

Rule Confidence = support({K,O,E}) / support(antecedent) Strong? (≥80%)
{K,O} ⇒ E 3/3 = 100%
{K,E} ⇒ O 3/4 = 75%
{O,E} ⇒ K 3/3 = 100%

Strong Association Rules (matching the metarule)

buys(X,K)buys(X,O)buys(X,E)[s=60%, c=100%]\text{buys}(X, K) \wedge \text{buys}(X, O) \Rightarrow \text{buys}(X, E) \quad [s = 60\%,\ c = 100\%]

buys(X,O)buys(X,E)buys(X,K)[s=60%, c=100%]\text{buys}(X, O) \wedge \text{buys}(X, E) \Rightarrow \text{buys}(X, K) \quad [s = 60\%,\ c = 100\%]

The rule {K,E} ⇒ O fails the min_conf = 80% threshold (only 75%), so it is not a strong rule and is excluded — even though {K,O,E} itself is a frequent (frequent) itemset, not every rule derived from it clears the confidence bar.

Similar questions

Data MiningConsider a database D, consisting of 15 transactions. Suppose minimum support count is 2 (i.e., min_sup = 20%) and minimum confidence required is 70%. Find out the frequent item set using a priori algorithm. Explain each step with diagram: | A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | |:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |20208mData MiningA database has five transactions. Let min sup = 60% and min con f = 80% : | TID | items_bought | |---|---| | T100 | {M, O, N, K, E, Y} | | T200 | {D, O, N, K, E, Y} | | T300 | {M, A, K, E} | | T400 | {M, U, C, K, Y} | | T500 | {C, O, O, K, I, E} | Find all frequent item sets using Apriori and FP-growth, respectively. Compare the efficiency of the two mining processes.202214mData MiningThe computational complexity of Apriori algorithm increases with the _______ in the bound of support threshold. (i) increase (ii) decrease (iii) Does not depend (iv) None of the above20222mData MiningAssociation rule mining discovers: (i) Hidden relationships among items in large datasets (ii) Regression patterns (iii) Decision tree rules (iv) Hierarchical clusters20252m