written 5.6 years ago by | • modified 4.8 years ago |
T_ID | Items bought |
---|---|
T-1000 | M,O,N,K,E,Y |
T-1001 | D,O,N,K,E,Y |
T-1002 | M,A,K,E |
T-1003 | M,U,C,K,Y |
T-1004 | C,O,O,K,E |
written 5.6 years ago by | • modified 4.8 years ago |
T_ID | Items bought |
---|---|
T-1000 | M,O,N,K,E,Y |
T-1001 | D,O,N,K,E,Y |
T-1002 | M,A,K,E |
T-1003 | M,U,C,K,Y |
T-1004 | C,O,O,K,E |
written 5.6 years ago by | • modified 5.6 years ago |
Apriori algorithm:
The apriori algorithm solves the frequent item sets problem. The algorithm analyzes a data set to determine which combinations of items occur together frequently. The Apriori algorithm is at the core of various algorithms for data mining problems. The best known problem is finding the association rules that hold in a basket -item relation.
Numerical:
Given:
Support = 60% = $\frac{60}{100}x5$ = 3
Confidence = 70%
ITERATION 1:
STEP 1: (C1)
Item | Count |
---|---|
A | 1 |
C | 2 |
D | 1 |
E | 4 |
I | 1 |
K | 5 |
M | 3 |
N | 2 |
0 | 3 |
U | 1 |
Y | 3 |
STEP 2: (L2)
Item | Count |
---|---|
E | 4 |
K | 5 |
M | 3 |
O | 3 |
Y | 3 |
ITERATION 2:
STEP 3: (C2)
Item | Count |
---|---|
E,K | 4 |
E,M | 2 |
E,O | 3 |
E,Y | 2 |
K,M | 3 |
K,O | 3 |
K,Y | 3 |
M,O | 1 |
M,Y | 2 |
O,Y | 2 |
STEP 4: (L2)
Item | Count |
---|---|
E,K | 4 |
E,O | 3 |
K,M | 3 |
K,O | 3 |
K,Y | 3 |
ITERATION 3:
STEP 5: (C3)
Item | Count |
---|---|
E,K,O | 3 |
K,M,O | 1 |
K,M,Y | 2 |
STEP 6: (L3)
Item | Count |
---|---|
E,K,O | 3 |
Now, stop since no more combinations can be made in L3.
ASSOCIATION RULE:
[E,K] $\rightarrow$ 0 = 3/4 = 75%
[K,O] $\rightarrow$ E = 3/3 = 100%
[E,O] $\rightarrow$ K = 3/3 = 100%
E $\rightarrow$ [K,O] = 3/4 = 75%
K $\rightarrow$ [E,O] = 3/5 = 60%
O $\rightarrow$ [E,K] = 3/3 = 100%
$\therefore$ Rule no. 5 is discarded because confidence $\ge$70%
So, Rule 1,2,3,4,6 are selected