Market Basket Analysis helps to discover associations between items in customers' purchases. It reveals patterns like:
"Customers who buy bread often also buy butter"
This means: Bread → Butter
Such insights are useful in product placement, promotions and in increasing sales.
Three metrics help us to evaluate such rules.
1. Support
This denotes how frequently the itemset appears in the dataset.
Support (A → B) = (Transaction with A & B) / Total transactions
Example: If transaction with Bread & Butter = 200 and total transaction = 1000,
then Support (Bread → Butter) = 200/1000 = 0.20
2. Confidence
This tells us how likely customers who bought A also bought B.
Confidence (A → B) = (Transaction with A & B) / Transactions with A
Example: If transaction with Bread & Butter = 200 & transaction with Bread = 400,
then Confidence (Bread → Butter) = 200/400 = 0.50
3. Lift
This is the ratio of the observed joint probability of A and B to the expected probability if A and B were independent.
Lift (A → B) = P(A∩B) / P(A)⋅ P(B)
Example: In our example, P(Bread∩Butter) = 0.2
P(Bread) = 0.4 & P(Butter) = 0.3, hence
Lift (Bread → Butter) = 0.2/0.12 = 1.67
- A lift greater than 1 indicates a positive association between A & B
- A lift equal to 1 means A & B are independent
- A lift less than 1 indicates a negative association.
Out of these three measures, support and lift are symmetric. That means:
- Support (Bread → Butter) = Support (Butter → Bread)
- Lift (Bread → Butter) = Lift (Butter → Bread)
However, Confidence (Bread → Butter) and Confidence (Butter → Bread) may not be equal because the denominator changes.
No comments:
Post a Comment