def getClift(rule, s, c, decision_table, list_judgeNominal): supp, conf = LERS.getSupportConfidence(rule, decision_table,list_judgeNominal) rule_c = mlem2.delEfromRule(rule,s) rule_c = rule_c.setValue(s,c) supp_c, conf_c = LERS.getSupportConfidence(rule_c, decision_table, list_judgeNominal) clift = conf / conf_c return(clift)
def getElift(rule, attr, v, decision_table, list_judgeNominal): supp, conf = LERS.getSupportConfidence(rule, decision_table, list_judgeNominal) rule_s = delEFromRule(rule, attr, v) supp_s, conf_s = LERS.getSupportConfidence(rule_s, decision_table, list_judgeNominal) if conf_s == 0: elift = 999 else : elift = conf / conf_s return(elift)