Conviction
Conviction is a way to judge how surprising an association rule is. It asks: if the rule were wrong, how often would that happen compared with what you would expect just by chance?
What conviction measures
In association rule learning, a rule looks like A → B, meaning “when A appears, B also appears.” Conviction compares the expected frequency of cases where A happens without B against the actual frequency of those failures. Its formula is:
conviction(A → B) = (1 - support(B)) / (1 - confidence(A → B))
If the rule has high confidence and failures are rare, conviction becomes large. A value of 1 means the rule is no better than independence. Values greater than 1 suggest a meaningful implication. If confidence reaches 1, conviction goes to infinity, because the rule never fails in the data.
Why it matters
Confidence alone can be misleading. If B is already very common, many rules pointing to B look strong even when they are not interesting. Lift helps correct that by comparing co-occurrence to independence, but conviction adds something different: it is sensitive to the direction of the rule and focuses on how strongly the rule avoids contradiction.
- In market basket analysis, bread → butter and butter → bread can have different conviction values.
- In fraud pattern mining, a high-conviction rule highlights combinations that rarely break, which can be more actionable than a rule that just has decent support.
- In recommendation systems based on co-purchases, conviction helps filter rules that look strong only because the recommended item is popular.
How it is used in practice
Tools such as mlxtend.frequent_patterns.association_rules in Python report conviction alongside support, confidence, and lift. Analysts use it to rank or prune rules after mining frequent itemsets with algorithms like Apriori or FP-Growth. Ignoring conviction can leave you with rules that are frequent but not genuinely informative about directional dependence.
Conviction is an association-rule metric that measures how strongly the presence of an antecedent implies the consequent by comparing the expected frequency of rule violations under independence to the observed frequency. A higher conviction means the rule is violated less often than chance would predict; a value of 1 indicates no implication beyond independence. It matters because it highlights directional, implication-like rules that support and lift alone can miss.
Imagine a shopping rule like: “People who buy pasta often buy sauce.” Conviction is a way of asking how surprising it would be to break that rule. If people who buy pasta almost always also buy sauce, then seeing pasta without sauce feels unusual, and conviction is high.
In AI, conviction helps judge how strong and believable an “if this, then that” pattern really is in data. It matters because some patterns happen together just by chance, while others behave more like dependable habits. A higher conviction suggests the rule is more meaningful and less likely to be a coincidence.