- 2065 Baisakh
Apriori on 8 transactions, 25% support
Short answer
With min support 2 (25%) and assumed min confidence 60%, frequent itemsets: A,B,C,D,E; AC,AD,AE,CD,CE,DE; ACD,ADE,CDE. Strong rules include A,E→D (100%), D→E (83.3%), E→D (83.3%), A→D (80%), A,D→E (75%), D→A (66.7%).
Write the Apriori Algorithm. Use this algorithm to find the frequent item set and generate few rules associated with the transaction. (Take minimum support=25%, minimum confidence% [value not printed in the paper])
| Transaction ID | Items |
|---|---|
| 1 | A, C, D |
| 2 | C, D, E |
| 3 | A, D, E |
| 4 | B, D, E |
| 5 | A, C, D, E |
| 6 | A, D, E |
| 7 | A, B, C |
| 8 | C, E |
Apriori algorithm
L1 = frequent items (scan database)
for k = 2 while L(k-1) is not empty:
Ck = join(L(k-1)) and prune candidates with an infrequent subset
scan database, count candidates
Lk = candidates with support >= min_support
output all Lk; then generate rules with confidence >= min_conf
Principle: every subset of a frequent itemset must be frequent.
Solution
8 transactions, minimum support 25% → 0.25 × 8 = 2 transactions. The minimum confidence is not given, so 60% is assumed.
C₁ → L₁: A 5, B 2, C 5, D 6, E 6. All items have count ≥ 2, so L₁ = {A, B, C, D, E}.
C₂ counts: AB 1, AC 3, AD 4, AE 3, BC 1, BD 1, BE 1, CD 3, CE 3, DE 5. L₂ = {AC:3, AD:4, AE:3, CD:3, CE:3, DE:5} (AB, BC, BD, BE removed, so B appears in no larger itemset).
C₃ by joining L₂: ACD, ACE, ADE, CDE (others like ADC are the same). All 2-subsets are frequent (no pruning). Counts: ACD 2, ACE 1, ADE 3, CDE 2. L₃ = {ACD:2, ADE:3, CDE:2}.
C₄: ACDE would need ACE, which is infrequent, so it is pruned. Stop.
Frequent itemsets: A, B, C, D, E; AC, AD, AE, CD, CE, DE; ACD, ADE, CDE.
Rules from {A, D, E} (support 3)
| Rule | Confidence | Strong (≥ 60%)? |
|---|---|---|
| A, E → D | 3/3 = 100% | Yes |
| A, D → E | 3/4 = 75% | Yes |
| D, E → A | 3/5 = 60% | Yes |
| A → D, E | 3/5 = 60% | Yes |
| D → A, E | 3/6 = 50% | No |
| E → A, D | 3/6 = 50% | No |
Rules from some 2-itemsets
D → E 5/6 = 83.3%; E → D 5/6 = 83.3%; A → D 4/5 = 80%; D → A 4/6 = 66.7%; A → C 3/5 = 60%.
Rules from {A, C, D} and {C, D, E} (support 2)
A, C → D 2/3 = 66.7%; C, D → A 66.7%; C, D → E 66.7%; C, E → D 66.7%; the others (A, D → C 50%, D, E → C 40%, etc.) are weak.
Answer: frequent itemsets are listed above (largest {A, D, E}, {A, C, D}, {C, D, E}). Strong rules (confidence ≥ 60%) include A,E → D (100%), D → E (83.3%), E → D (83.3%), A → D (80%), A,D → E (75%), D → A (66.7%).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Apriori on four transactions, support 2 · Data Mining, chapter 4
- Apriori on t1-t5 with rules · Data Mining, chapter 4
- Apriori on HotDogs data with rules · Data Mining, chapter 4
- Association rules, support, confidence · Data Mining, chapter 4
- FP-tree on t1-t5 data · Data Mining, chapter 4
- FP-Growth and Apriori disadvantage · Data Mining, chapter 4
- JFET ID and VDS (IDSS 10 mA, VP -4 V, 25 V) · Electronics Devices and Circuit, chapter 3 · asked 2×
- Coordination with residual voltage 200 Id^0.25 (PR 1.2) · High Voltage Engineering, chapter 4 · asked 2×
- Coordination with residual voltage 200 Id^0.25 (PR 1.25) · High Voltage Engineering, chapter 4 · asked 2×
- Algorithm for numbers divisible by 9 not 6 · Computer Programming, chapter 2