Download presentation
Presentation is loading. Please wait.
1
Prepared by Dr. Maher Abuhamdeh
FP Growth Prepared by Dr. Maher Abuhamdeh
2
Question :Find all frequent item sets or frequent patterns in the following database using FP-growth algorithm. Take minimum support as 30%.
3
Table 1 - Snapshot of the Database
4
Step 1 - Calculate Minimum support
First should calculate the minimum support count. Question says minimum support should be 30%. It calculate as follows: Minimum support count(30/100 * 8) = 2.4 Count 2
5
Step 2 - Find frequency of occurrence
Table2 -Frequency of Occurrence The frequent item list for the above table will be B:6, D:6, A: 5, E:4, C: 3.
6
Step 3 - Prioritize the items
In Table 2 you can see the numbers written in Red pen. Those are the priority of each item according to it's frequency of occurrence. Item B got the highest priority (1) due to it's highest number of occurrences and so on.
7
Step 4 -Order the items according to priority
As you see in the Table 3 new column added to the Table 1. In the Ordered Items column all the items are queued according to it's priority, which mentioned in the Red ink in Table 2. For example, in the case of ordering row 1, the highest priority item is B and after that D, A and E respectively.
8
Table 3 - New version of the Table 1
9
Step 5 - Now draw the FP tree
Row 1:
10
Row 2:
12
Final FP tree
13
How to identify frequent patterns from FP tree?
The Items of the DB and there frequency of occurrences can be listed as B:6 D:6 A:5 E:4 C:3
14
Let start with minimum frequently which is
15
Node C BDAE: 1 - The branch which surrounded in Blue. B: 1 - The branch which surrounded in Red. BAE: 1 - The branch which surrounded in Brown.
16
Then we have to find F-list from the Conditional Pattern Base of C
Then we have to find F-list from the Conditional Pattern Base of C. The list of items are B:3,D:1,A:2,E:2 but B:3 only eligible for sitting on the F-list due to fulfil the Minimum Support Count. So the F-list is B:3
17
Conditional pattern base for C:3
BDAE: 1; B: 1; BAE: 1 F-list: B:3 Conditional FP-tree for C Frequent patterns C:3, BC:3
18
Node E Let's find Conditional Pattern Base for E:4
19
BDA: 2 - Red line BA:1 - Brown line DA:1 - Blue line And F-list will be A:4 B:3 D:3
21
Item Conditional pattern base Conditional FP tree Frequent patterns generated C {BDAE:1} {B:3} {BA;E:1} (B:3) {BC:3} E {BDA:2} { BA:1} {DA:1} (BDA:3) {BDAE:3} A {B,D:3} {B:1} {D:1} (B,D:3) {ABD:3} D {B:4} (B:4) {DB:4}
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.