2076 2

CSC420 ยท 2076 ยท 10 marks

List the problems of Apriori algorithm with its possible solutions. Consider the following transaction dataset. What association rules can be found in this set, if the minimum support is 3 and the minimum confidence is 80%? | Transaction_ID | Item_List | |---|---| | T1 | {K, A, D, B} | | T2 | {D, A,

List the problems of Apriori algorithm with its possible solutions. Consider the following transaction dataset. What association rules can be found in this set, if the minimum support is 3 and the minimum confidence is 80%?

Transaction_IDItem_List
T1{K, A, D, B}
T2{D, A, C, E, B}
T3{C, A, B, E}
T4{B, A, D}

[10]

Data Warehousing and Data MiningChapter 5: Mining Frequent PatternsLimitation and improving AprioriNumerical: Association rules mining

Apriori Algorithm: Problems, Solutions, and Association Rule Mining

Part 1: Problems of Apriori and Solutions

Problems

  1. Huge number of candidate itemsets. At each level Apriori generates many candidates. For example, $10^4$ frequent 1-itemsets produce roughly $\binom{10^4}{2}\approx 5\times10^7$ candidate 2-itemsets.
  2. Multiple database scans. The full database must be scanned once for every level $k$, causing heavy I/O cost.
  3. Costly pattern matching / support counting. Each candidate must be checked against every transaction.
  4. High memory usage. Storing all candidates at each iteration is infeasible for large data.

Possible Solutions

ProblemSolution
Too many candidatesHash-based technique to bucket and prune candidate k-itemsets
Repeated scansFP-Growth (only 2 scans, no candidate generation)
Large candidate setsTransaction reduction (drop transactions with no frequent itemsets)
Memory bottleneckPartitioning the database to fit in memory
Full-database costSampling a representative subset, then verify
Support counting costDynamic Itemset Counting (DIC) to reduce passes

Part 2: Association Rule Mining

Given data

  • Transactions: T1{K,A,D,B}, T2{D,A,C,E,B}, T3{C,A,B,E}, T4{B,A,D}
  • Minimum support count = 3
  • Minimum confidence = 80%
  • Total transactions = 4

Step 1: L1 (1-itemsets)

ItemCountFrequent (>=3)?
K1No
A4Yes
D3Yes
B4Yes
C2No
E2No

$L_1 = { {A}, {D}, {B} }$

Step 2: L2

Candidates: {A,D}, {A,B}, {D,B}

ItemsetTransactions containingCountFrequent?
{A,D}T1,T2,T43Yes
{A,B}T1,T2,T3,T44Yes
{D,B}T1,T2,T43Yes

$L_2 = { {A,D}, {A,B}, {D,B} }$

Step 3: L3

Candidate {A,D,B}. All subsets ({A,D},{A,B},{D,B}) are frequent, so retain.

ItemsetTransactionsCountFrequent?
{A,D,B}T1,T2,T43Yes

$L_3 = { {A,D,B} }$

No 4-itemsets possible. Terminate.

Step 4: Association Rules

$$\text{Conf}(X\Rightarrow Y)=\frac{\text{Sup}(X\cup Y)}{\text{Sup}(X)}$$

Support values: A=4, D=3, B=4, {A,D}=3, {A,B}=4, {D,B}=3, {A,D,B}=3.

From {A,D} (sup 3):

RuleConfidence>=80%?
A โ‡’ D3/4 = 75%No
D โ‡’ A3/3 = 100%Yes

From {A,B} (sup 4):

RuleConfidence>=80%?
A โ‡’ B4/4 = 100%Yes
B โ‡’ A4/4 = 100%Yes

From {D,B} (sup 3):

RuleConfidence>=80%?
D โ‡’ B3/3 = 100%Yes
B โ‡’ D3/4 = 75%No

From {A,D,B} (sup 3):

RuleConfidence>=80%?
A โ‡’ D,B3/4 = 75%No
D โ‡’ A,B3/3 = 100%Yes
B โ‡’ A,D3/4 = 75%No
A,D โ‡’ B3/3 = 100%Yes
A,B โ‡’ D3/4 = 75%No
D,B โ‡’ A3/3 = 100%Yes

Final Strong Association Rules (support >= 3, confidence >= 80%)

  1. $D \Rightarrow A$ (100%)
  2. $A \Rightarrow B$ (100%)
  3. $B \Rightarrow A$ (100%)
  4. $D \Rightarrow B$ (100%)
  5. $D \Rightarrow A,B$ (100%)
  6. $A,D \Rightarrow B$ (100%)
  7. $D,B \Rightarrow A$ (100%)

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.