SongDark / FPgrowth

FP-growth codes in "Machine Learning in Action"
53 stars 26 forks source link

请问len(freqSet)>1这个频繁项只有一项为何还能进行置信度计算 #3

Open justforyou2017 opened 4 years ago

justforyou2017 commented 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