DWDMData Warehousing & Mining
Unit III · CO3

"People Who Bought…"
Association Rules

Which items sell together? Association rule mining finds patterns like {Bread} → {Butter} using support and confidence. Slide the support threshold and watch Apriori prune the infrequent itemsets in real time.

Course IT314 B
Outcome CO3
Lectures 9
Algorithms Apriori · FP-Growth

What this unit covers

INTERACTIVE
0
Transactions
0
Key measures
0
Algorithms
0
Quiz questions
01

Support, Confidence & the Apriori Principle

The two measures

support(X) = txns with X / total
confidence(X→Y) = support(X∪Y) / support(X)
lift(X→Y) = confidence / support(Y)

Support = how often; Confidence = how reliable; Lift > 1 = positively correlated.

The Apriori principle

If an itemset is infrequent, then all of its supersets are also infrequent. This anti-monotone property lets Apriori prune huge numbers of candidates without counting them — the key to efficiency.

02

Frequent Itemset Explorer

Six shopping baskets. Slide the minimum support — itemsets that meet it turn green (frequent); the rest are pruned. Notice how raising support shrinks the frequent set and, by Apriori, kills the bigger itemsets first.

Apriori on 6 transactionsM=Milk B=Bread U=Butter E=Eggs R=Beer
Minimum support (count of transactions)3 (50%)
1-itemsets
2-itemsets
3-itemsets
03

Rule Strength

From a frequent itemset we generate rules and score them. Pick a rule and see its support, confidence and lift, computed from the same six baskets.

Association rule metricspick a rule
Support
Confidence
Lift
04

Key Concepts

Frequent itemset

A set of items appearing together in at least min-support transactions.

Apriori algorithm

Iteratively generates candidate k-itemsets from frequent (k−1)-itemsets, counts support, prunes.

Candidate generation

Join frequent (k−1)-itemsets; prune any whose (k−1)-subset is infrequent.

Partition algorithm

Scans the DB in two passes by partitioning it — any global frequent set is frequent in some partition.

FP-Growth

Builds a compact FP-tree and mines frequent patterns without candidate generation — usually faster.

Maximal frequent itemset

A frequent itemset with no frequent supersets.

Closed frequent itemset

A frequent itemset with no superset having the same support.

Rule generation

For each frequent itemset, form rules and keep those above min-confidence.

05

Watch & Learn

Algorithm · AprioriApriori algorithm (solved example)Support, confidence, candidate generation and pruning step by step.Open on YouTube ↗
Algorithm · FP-GrowthFP-Growth & FP-treeMining frequent patterns without candidate generation.Open on YouTube ↗
Concept · itemsetsMaximal vs closed frequent itemsetsCompact representations of frequent patterns.Open on YouTube ↗
06

Unit III Quiz — 10 Questions

Test yourself: Association Rules0 / 10