Conviction is an association-rule metric for comparing how often an antecedent occurs without its consequent under independence with how often that absence is observed. It helps shortlist rules that may be useful in practical business applications. section 4.3.1
Association-rule analysis uses conviction alongside support, confidence, and lift to assess rule efficacy. Higher values are treated as evidence of stronger, more useful rules, although generated rules still require selection before deployment. section 4.3.1 section 4.11
Use conviction within an implementation workflow:
- Prepare transaction records as item lists and generate rules with Apriori. section 4.4.1
- Inspect each rule together with its support, confidence, lift, and conviction values. section 4.4.1
- Adjust support, confidence, and lift thresholds to control how many candidate rules are produced, then select rules worth using. section 4.4.1
Retail transaction rules
A five-invoice dataset records milk, eggs, bread, and cheese as binary item-presence values. These transactions provide a concrete setting for evaluating rules with support, confidence, lift, and conviction; a larger Python example lists the same metrics for rules such as almonds -> burgers. section 4.3.1 section 4.4.1
Table 4.2 Dataset to understand the concept of support, confidence, lift, and conviction
|
Invoice Number
|
Milk
|
Eggs
|
Bread
|
Cheese
|
|---|---|---|---|---|
|
1001
|
1
|
1
|
1
|
0
|
|
1002
|
0
|
1
|
1
|
1
|
|
1003
|
1
|
1
|
1
|
0
|
|
1004
|
0
|
1
|
0
|
1
|
|
1005
|
0
|
1
|
1
|
0
|
Inspect the binary invoice table used to ground conviction and the other association-rule metrics. section 4.3.1
