-
Notifications
You must be signed in to change notification settings - Fork 206
Open
Description
In chapter 11
def generateRules(L, supportData, minConf=0.7): #supportData is a dict coming from scanD
bigRuleList = []
for i in range(1, len(L)):#only get the sets with two or more items
for freqSet in L[i]:
H1 = [frozenset([item]) for item in freqSet]
if (i > 1):
rulesFromConseq(freqSet, H1, supportData, bigRuleList, minConf)
else:
calcConf(freqSet, H1, supportData, bigRuleList, minConf)
return bigRuleListWhen the frequent set is like {1,2,3}, it can't generate the rules like {1,2}->3.
Shoule the snippet
if (i > 1):
rulesFromConseq(freqSet, H1, supportData, bigRuleList, minConf)
else:
calcConf(freqSet, H1, supportData, bigRuleList, minConf)change to
rulesFromConseq(freqSet, H1, supportData, bigRuleList, minConf)
if (i > 1):
calcConf(freqSet, H1, supportData, bigRuleList, minConf)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels