0
2.0kviews
A database has five transactions. Let minimum support = 30% and minimum confidence = 70%

i. Find all frequent patterns using Apriori Algorithm.

ii. List strong association rules.

Transaction_Id Items
A 1, 3, 4, 6
B 2, 3, 5, 7
C 1, 2, 3, 5, 8
D 2, 5, 9, 10
E 1, 4
1 Answer
0
40views

Minimum Support = 30% = $\frac{30}{100} \times 5 = 1.5$

Minimum Confidence = 70%

1] Generate $c_1$

$c_1 $ =

{ {1} $\quad$ 3 $\quad$ {6} $\quad$ 1

{2} $\quad$ 3 $\quad$ {7} $\quad$ 1

{3} $\quad$ 3 $\quad$ {8} $\quad$ 1

{4} $\quad$ 2 $\quad$ {9} $\quad$ 1

{5} $\quad$ 3 $\quad$ {10} $\quad$ 1 $\quad$ }

$\therefore L_1$ = { {1} {2} {3} {4} {5} }

2] Generate $c_2 = L_1 \bowtie L_1$

$c_2$ =

{ {1 2} $\quad$ 1 $\quad$ {3 4 } $\quad$ 1

{1 3 } $\quad$ 2 $\quad$ {3 5 } $\quad$ 2

{1 4 } $\quad$ 2 $\quad$ {4 5 } $\quad$ 0

{1 5 } $\quad$ 1 $\quad$ }

{2 3 } $\quad$ 2

{2 4 } $\quad$ 0

{2 5} $\quad$ 3

$\therefore L_2$ = { {1 3 } {1 4 } {2 3} {2 5} {3 5} }

3] Generate $c_3 = L_2 \bowtie L_2$

$c_3$ = {2 3 5 } 2 }

$\therefore L_3$ = { { 2 3 5 } }

$\rightarrow$ from $L_2$

{1 3 } $\rightarrow$ 2 $\quad$ {1 4} $\rightarrow$ 2

$\times$ 1 $\rightarrow$ 3 $\quad$ 2/3 > 70% 1 $\rightarrow$ 4 $\quad$ 2/3 > 70% $\times$

$\times$ 3 $\rightarrow$ 1 $\quad$ 2/3 > 70% 4 $\rightarrow$ 1 $\quad$ 2/2 > 70%

{2 3} $\rightarrow$ 2 $\quad$ {2 5} $\rightarrow$ 3

$\times$ 2 $\rightarrow$ 3 $\quad$ 2/3 > 70% 2 $\rightarrow$ 5 $\quad$ 3/3 > 70%

$\times$ 3 $\rightarrow$ 2 $\quad$ 2/3 > 70 5 $\rightarrow$ 2 $\quad$ 3/3 > 70%

{3 5 } $\rightarrow$ 2

$\times$ 3 $\rightarrow$ 5 $\quad$ 2/3 > 70%

$\times$ 5 $\rightarrow$ 3 $\quad$ 2/3 > 70%

{ 2 3 5} $\rightarrow$ 2

$\times$ 2 $\rightarrow$ 3,5 $\quad$ 2/3 > 70% 2, 3 $\rightarrow$ 5 $\quad$ 2/2 > 70%

$\times$ 3 $\rightarrow$ 2,5 $\quad$ 2/3 > 70% 2,5 $\rightarrow$ 3 $\quad$ 2/3 > 70%

$\times$ 5 $\rightarrow$ 2,3 $\quad$ 2/3 > 70% 3,5 $\rightarrow$ 2 $\quad$ 2/2 > 70%

$\therefore$ The strong rules are

4 $\rightarrow$ 1 $\quad$ 2,3 $\rightarrow$ 5

2 $\rightarrow$ 5 $\quad$ 3,5 $\rightarrow$ 2

5$\rightarrow$ 2.

Please log in to add an answer.

Continue reading...

The best way to discover useful content is by searching it.

Search