Beispiel #1
0
 def get_first_rules(self, start_date, data_set, min_support, min_conf):
     l, support_data = apriori_support.apriori(data_set, min_support)
     store_support_data = StoreSupportData()
     store_support_data.store_support(start_date, support_data)
     rules = apriori_support.generateRules(l, support_data, min_conf)
     if len(rules) != 0:
         store_rules = StoreRules()
         store_rules.store_rule(rules, start_date)
     return rules
Beispiel #2
0
 def get_iter_rules(self, start_date, l, support_data, min_conf):
     rules = apriori_support.generateRules(l, support_data, min_conf)
     store_rules = StoreRules()
     store_rules.store_rule(rules, start_date)
     return rules