1/27
Looks like no tags are added yet.
Market Basket Analysis (MBA)
Customers:
Who the customers are
Why they make certain purchases
K-nearest neighbor
Merchandise:
Which products are purchased together
Association Rules
MBA's information is actionable
Store layout
Inventory management
Service bundling, product bundling
Promotion, Coupons
Recommender Systems
Association Rules in Recommender Systems
Recommendations are made from historical transaction records
MBA is not only about retail industry…
Telecoms: Phone services, Internet access, TV channels
Credit Cards: rental cars and hotel rooms
Banking: car loan, investment
Insurance: Unusual combination of insurance claims can be a sign of fraud
Medial: Medical complications based on certain combination of treatments
What symptoms go together
Market Basket Data
MBA is a set of techniques that focus on point-of-sale(PoS) transaction data
4 levels of market basket data
Orders
Items
Customers
Stores

Association Rules
If a customer purchases product A, then most likely purchases product B
Objective: answering "what goes with what?" -> Affinity Analysis
Association Rule is the technique used for MBA
Transaction-based or event-based
Actionable Rules
Contain high-quality, actionable information
Trivial Rules
information already well-known by those familiar with the business
Inexplicable Rules
No explanation, do not suggest action

Point of Sales Transactions - Customers and Items purchased
Co-occurrence Matrix of Products
Rules can be extracted from the co-occurrence matrix
Many rules can form from the co-occurrence matrix
If {Soda} then {OJ}
If {OJ and Milk} then {Soda}
# of rules can grow exponentially

Association Rules Idea
Examine all possible rules between items in an If-then format
Select rules that are more likely of true dependence
IF conditions, THEN Results
Conditions and Results are disjoint items (they are not related)
Conditions and Results are called Item-sets
Item-sets: Combination of disjoint items (unqiue items)
Ideally we want o creates rules using all possible combinations of items
Frequency of ItemSets - Support
How many transactions support the rule?
How often an itemset appears in the dataset
Support = (# of trans. Where the rule holds)/(total # of transactions)
Support Example
IF Soda -> Orange Juice
Support = (# of transactions where the rule holds)/(total # of transactions)
Support=2/5 = 40%
In 40% of purchases, Soda and Orange juice are bought together
Apriori Algorithm
For k products….
User sets a minimum threshold on Support and Confidence
Generate list of one-item sets that meet the support criterion
Use the list of one-item sets to generate list of 2-item sets that meet the Support criterion
Continue up through k-item sets
Evaluate rules using Confidence and Lift
Confidence
ow often the rule is true? How much degree of confidence is in the rule?
It measures how often the right side of the rule holds, given the left side
Confidence = (# of transactions where the rule holds)/(# of transactions where the conditional part of the rule holds)
Confidence Example
Example: "If a customer purchases soda, then the customer also purchases orange juice"
IF Soda -> Orange Juice
Confidence = 2/3 = 0.6667 %
67% of the time when Soda is purchased, Orange Juice is also purchased
A high confidence value suggests a STRONG RULE and vice versa
Rules with high confidence may not be explainable!
Lift
How much better the rule than a random guess?
How much better the rule is at predicting the results?
Lift = Prob (condition and result)/[Prob(condition)*Prob(result)]
Lift values closer to 1 imply…
the condition and result of the rule are independent and the rule is not interesting (not strong)
The higher the value of life of a rule, the greater the strength of the association, and more interesting the rule is
Caution about Selecting Strong Rules - Lift
Random data can generate apparently interesting association rules
The more rules you produce the greater this danger
Rules based on large numbers of records are less subject to this danger!
Lift Example
Rule: "If a customer purchases soda, then the customer also purchases orange juice"
IF Soda -> Orange Juice
Lift = Prob(Condition and Result)/Prob(Condition)*Prob(Result) =(2/5)/(3/5)*(4/5) = (5/6) <1
2/5 trans include both soda and orange juice. 3 out of 5 trans include soda, and 4/5 trans include orange juice.
Sequential Pattern Analysis
Adds element of time to market basket analysis
Involves actions that occur in particular order in time
Customers who purchase new lawnmowers are likely to purchase a new garden hose in the following 3 weeks
When a customer asks for an account reconciliation, she will close all her accounts within 2 weeks
Association Rules Summary
Association rules are based on counting co-occurrences
Focus entirely on frequent(popular) item combinations
Rules that have higher support, confidence, and lift are potentially useful
Even these rules may be TRIVIAL, INEXPLICABLE, OR SIMPLY HARD to know what to do with
Association rules can be used for sequential pattern analysis when purchasers are identified and purchases are time-stamped
Association Rules V.S. Collaborative Filtering

Support Calculation

Lift Calculation

Confidence Calculation
