Association Mining to Correlation Analysis
1. The Problem with Support and Confidence
Support and confidence alone are not sufficient — they can report a strong, "interesting" rule that is in fact misleading because the two items are statistically negatively correlated (they avoid each other).
Classic counter-example. 10,000 transactions about games: 6,000 contain computer games, 7,500 contain videos, 4,000 contain both.
- Rule:
computer games ⇒ videos - support (high), confidence (high) → Apriori calls this a strong rule.
- But , so buying videos is more likely when not buying computer games (or 75% overall).
The rule is misleading: computer games and videos are actually substitutes, but confidence hid that.
2. Correlation Measures
(a) Lift (interest / improvement)
- → and are independent; → positively correlated; → negatively correlated.
Limitation: lift is not symmetric-friendly and can be inflated for rare itemsets with very low support; it can be large even for itemsets with small support (instability).
(b) (chi-square) test — the standard test of independence for nominal data. Build a contingency table for and :
| Row total | |||
|---|---|---|---|
| Col total |
For the games example (A = games, B = videos), with 2000 buying neither:
| videos | ¬videos | total | |
|---|---|---|---|
| games | 4000 | 2000 | 6000 |
| ¬games | 3500 | 500 | 4000 |
| total | 7500 | 2500 | 10000 |
Degrees of freedom ; the critical value at 0.05 significance is 3.841. Since , reject independence → the two items are strongly correlated — and because observed < expected in the cell, the correlation is negative.
Limitation of : it indicates correlation but not the direction (positive/negative) or the strength; also sensitive to the number of tuples.
(c) Cosine / all-confidence-type measures (null-invariant)
Null-invariance property: the measure should not be affected by the number of transactions containing neither item (the ¬A, ¬B count) — important because real transaction data is extremely sparse, and /lift behave badly there.
| Measure | Formula | Null-invariant? |
|---|---|---|
| Lift | No | |
| as above | No | |
| Cosine | Yes | |
| Kulczynski (Kulc) | Yes | |
| All-confidence | Yes | |
| Max-confidence | Yes |
3. Null-Invariance Example (why it matters)
Two datasets, 100 transactions each (min_sup = 30%):
| Dataset | Lift | Cosine | Kulc | ||||
|---|---|---|---|---|---|---|---|
| (few nulls) | 0.25 | 0.05 | 0.05 | 10.0 | 500 | 0.79 | 0.83 |
| (many nulls) | 0.25 | 0.05 | 0.05 | 10.0 | 500 | 0.79 | 0.83 |
| (very many nulls, e.g. 1,000,000 txns) | 0.25 | 0.05 | 0.05 | ~1.0 | huge/thin | high | 0.83 |
The actual behaviour: for a dataset where only 0.25% of a million tuples contain and jointly, lift and change dramatically with the null count, while cosine, Kulczynski, all-confidence and max-confidence stay stable. That is why a balanced combination is recommended:
4. Recommended Practice — Imbalance Ratio (IR)
For the contingency table of and :
Decision rule using Kulczynski + IR
| Kulczynski | IR | Interpretation |
|---|---|---|
| high (close to 1) | low | Strong positive correlation — interesting rule |
| high | high | One item is much rarer than the other (a one-way implication, e.g. coke ⇒ ¬sprite type patterns) |
| low | any | No/weak or negative correlation — prune |
If Kulc ≈ 0.5 and IR ≈ 0, the two items are independent and the rule should be discarded even if its confidence is high.
5. Why Confidence Can Be Misleading — Formal Note
confidence(A⇒B) = P(B|A) ignores . Adding the correlation test converts a "strong" rule into an "interesting" rule. Hence the mining flow becomes:
frequent itemsets (Apriori/FP-growth)
|
v
strong rules (support >= min_sup, confidence >= min_conf)
|
v
correlation / interestingness filter (lift, chi^2, Kulc + IR, cosine)
|
v
truly interesting rules -> knowledge
6. Other Rule Interestingness Measures
| Measure | Formula | Notes |
|---|---|---|
| Support | Coverage | |
| Confidence | Reliability, ignores | |
| Lift | ratio | Symmetric |
| Conviction | for perfect rule; sensitive to | |
| Leverage | Difference from independence | |
| Jaccard | Null-invariant | |
| Interest (PS) | Combines both | |
| Gini / -coefficient | variants | Symmetric association |
Lift vs support example: A lift of 2 with support 0.01 is less reliable than lift of 1.5 with support 0.20, so many systems use an interest factor combining both.
7. Exam Points
- Explain with example why support and confidence alone are insufficient; compute lift and to show negative correlation — 10 marks (very frequent).
- Define and compare cosine, Kulczynski, all-confidence and the null-invariance property; explain the imbalance ratio — 5-7 marks.
- Short notes: lift, conviction, leverage — 3-5 marks.
- Draw the flow "frequent itemsets → strong rules → correlation filter" — 3 marks.