Skip to content

zgzhong/FPGrowth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FP-Growth Algorithm

This is the C++ implement of FP-Growth Algorithm. Usage:

alpha::FPGrowth fpGrowth(numOfRecords, support, confidence);

// This map stores the count of every field
std::map<string size_t> fieldCountMap;
// Build the Frequent Table
fpGrowth.buildFPTable(fieldCountMap);

// Build Frequent Tree
while ( some_loop ) {
    // fetch data
    fpGrowth.addRecord({data1, data2, data3, data4...});
}

Yon can run the example for fun. But this code requires boost library installed in your system.

$ make run