data_mine
data_mine copied to clipboard
请问如何得到带有支持度的结果?
support_data字典中保存了频繁项和支持度 若要使最后得到的结果中包含支持度信息,可以修改generate_R函数
def generate_R():
...
big_rule=(...,support_data[freq_set])
if ...:
rule_list.append(bigrule)
...
big_rule为满足置信度的关联规则集合,在集合末尾添加频繁项的支持度,并稍微修改最后保存规则的save_rule函数