Research Article

The Mining Algorithm of Maximum Frequent Itemsets Based on Frequent Pattern Tree

Table 4

Pseudocode of FP-MFIA.

Algorithm 3: The algorithm of FP-MFIA.

Input: The FP-tree of transaction database D, the Header table of frequent item, the minimum support count s, the frequent item list LDF in D
Output: The MFI-list
Process:
MFI-list = Ø;
Preorder traversal of the FP-tree to obtain a simplified FP-tree, and initialize the MFI-list at the same time;
Traverse the MFI-list and simplify the FP-tree;
p = Header table[| Header table|]; //Analyze each node in the Header table in reverse order, p first points to the last node;
while(p exists){
p = p- > item_links; //p points to the first node in the FP-tree with the same item name
q = q- > first_MFI; //q points to the MFI-list node with the same item name as p in the MFI-list
while (q exists)
{According to p- > item_links and the node_links of the nodes in the FP-tree, find all the nodes nd1, nd2,...,ndh with the item name p- > item_name;
for(i = 1; i ≤ h; i++)
for(j = 1; j ≤ h; j++)
If() then
{Convert ndi- > node_pre, ndj- > node_pre to bit vector;
nd = ndi;
n = nd- > node_pre∧ndj- > node_pre;
if(the number of “1” in nd > 1) then
{nd.count = ndi- > node_count + ndi- > node_count;//Calculate the support count for nd
q = q- > first_MFI;
If(nd.count ≥ s)
{while(q- > next_MFI)
if(nd is not a subset of an element in the itemset pointed to by qq = q- > next_MFI;
else break; }
If(q- > next_MFI = = null) q- > next_MFI = nd; }
}}}}