Association Rules and Market Basket Analysis

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/27

encourage image

There's no tags or description

Looks like no tags are added yet.

28 Terms

1
New cards

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


2
New cards

MBA's information is actionable

  • Store layout

  • Inventory management

  • Service bundling, product bundling

  • Promotion, Coupons

  • Recommender Systems


3
New cards

Association Rules in Recommender Systems

Recommendations are made from historical transaction records

4
New cards

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


5
New cards

Market Basket Data

  • MBA is a set of techniques that focus on point-of-sale(PoS) transaction data


6
New cards

4 levels of market basket data

  • Orders

  • Items

  • Customers

  • Stores


<ul><li><p><span>Orders</span></p></li><li><p><span>Items</span></p></li><li><p><span>Customers</span></p></li><li><p><span>Stores</span></p></li></ul><p></p>
7
New cards

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


8
New cards

Actionable Rules

Contain high-quality, actionable information

9
New cards

Trivial Rules

information already well-known by those familiar with the business

10
New cards

Inexplicable Rules

No explanation, do not suggest action

11
New cards
term image

Point of Sales Transactions - Customers and Items purchased

Co-occurrence Matrix of Products

12
New cards

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


<ul><li><p><span>Many rules can form from the co-occurrence matrix</span></p></li><li><p><span>If {Soda} then {OJ}</span></p></li><li><p><span>If {OJ and Milk} then {Soda}</span></p></li><li><p><span># of rules can grow exponentially</span></p></li></ul><p></p>
13
New cards

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


14
New cards

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)

15
New cards

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


16
New cards

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


17
New cards

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)


18
New cards

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!


19
New cards

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)]


20
New cards

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

 

21
New cards

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!


22
New cards

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.


23
New cards

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


24
New cards

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


25
New cards

Association Rules V.S. Collaborative Filtering

knowt flashcard image
26
New cards

Support Calculation

knowt flashcard image
27
New cards

Lift Calculation

knowt flashcard image
28
New cards

Confidence Calculation

knowt flashcard image