diff --git a/fpgrowth_py/utils.py b/fpgrowth_py/utils.py index 782fd51..45e432e 100644 --- a/fpgrowth_py/utils.py +++ b/fpgrowth_py/utils.py @@ -39,7 +39,7 @@ def constructTree(itemSetList, frequency, minSup): headerTable[item] += frequency[idx] # Deleting items below minSup - headerTable = dict((item, sup) for item, sup in headerTable.items() if sup >= minSup) + headerTable = dict((item, sup) for item, sup in headerTable.items() if sup <= minSup) if(len(headerTable) == 0): return None, None @@ -147,4 +147,4 @@ def associationRule(freqItemSet, itemSetList, minConf): def getFrequencyFromList(itemSetList): frequency = [1 for i in range(len(itemSetList))] - return frequency \ No newline at end of file + return frequency