FP-Growth Algorithm
FP-Growth Algorithm
FP-GROWTH
ALGORITHM
PRESENTED BY
ANJALI XXXXX
WHAT IS FP GROWTH?
TID Frequenc
y
A 5
B 6
C 3
D 6
E 4
Table 1 - Snapshot of
Table2 -Frequency of
the Database
Occurrence
STEP 3 -PRIORITIZE THE ITEMS
TID Frequency
Priority
A 5
3
B 6
1
C 3
5
D Table2 -Frequency
6 of
2 Occurrence
E 4
4
STEP 4 -ORDER THE ITEMS ACCORDING TO
PRIORITY
Row 2:
B:2
Then update the above tree (Figure 1) by
entering the items of row 2. The items of row 2
are B,D,A,E,C. Then without creating another D:2
branch you can go through the previous branch
up to E and then you have to create new node
A:2
after that for C. This case same as a scenario of
traveling through a road to visit the towns of the
country. You should go through the same road to E:2
achieve another town near to the particular
town. When you going through the branch
C:1
second time you should erase one and write two
for indicating the two times you visit to that Figure 2- FP tree for
node. If you visit through three times then write Row 1,2
three after erase two
NUL
L
• Row 3:
B:2
In row 3 you have to visit B,A,E and C
respectively. So you may think A:1 D:2
you can follow the same branch again
by replacing the values of B,A,E and C E:1 A:2
B:6 D:2
Row 6:
B and D appears in row 6. So
C:1 A:1 D:4 A:1
just change the B:4 to B:5 and
D:3 to D:4.
E:1 A:3 E:1
Row 7:
Attach two new nodes A and E
C:1 E:2
to the D node which hanging on
the null node. Then mark D,A,E
C:1
as D:2,A:1 and E:1.
Row 8 : Figure 5 - Final FP tree
(Ohh.. last row) Attach new node
C to B. Change the traverse
times.(B:6,C:1)
STEP 6 -VALIDATION