Open justforyou2017 opened 4 years ago
def generateRules(freqItemList, supportData, minConf=0.7): bigRuleList = [] for freqSet in freqItemList: H1 = [frozenset([item]) for item in freqSet] if len(freqSet)>1: rulesFromConseq(freqSet, H1, supportData, bigRuleList, minConf) else: calcConf(freqSet, H1, supportData, bigRuleList, minConf) return bigRuleList
def generateRules(freqItemList, supportData, minConf=0.7): bigRuleList = [] for freqSet in freqItemList: H1 = [frozenset([item]) for item in freqSet] if len(freqSet)>1: rulesFromConseq(freqSet, H1, supportData, bigRuleList, minConf) else: calcConf(freqSet, H1, supportData, bigRuleList, minConf) return bigRuleList