The Mining Algorithm of Maximum Frequent Itemsets Based on Frequent Pattern Tree
Table 3
Pseudocode for constructing MFI-list.
Algorithm 2: Algorithm of constructing MFI-list.
Input: FP-tree
Output: MFI-list
Process:
current = T://current points to the current node to be traversed, and its initial value points to the tree root T
InitStack(s); //initialize stack s
There are untraversed paths in the FP-tree
{while (current- > node_count ≥ min_sup)
{current points to a child node that has not been visited;
Push(s,current- > node_name);
}
//When there is no child node or the node_count value of the child node is less than min_sup
MFI = {collection of items in stack s};
Convert the MFI into the corresponding bit vector and link it to the corresponding maximum frequent itemset linked list
current- > node_pre = MFI;
While(current has child nodes in the current path)
{pre = current;
current points to its child node;
current- > node_pre = pre- > node_pre∪current- > node_name;//Take the frequent itemset composed of the union of the node_pre of its parent node and the node_name of the node